snidera
09-26-2006, 01:29 PM
I'm trying the read the text in a comment to an element of a udt array.
UDT ....Summary().discription as string
For j = 1 To UBound(DefectCode())
ReDim Preserve DefectCodeSummary(1 To j)
DefectCodeSummary(j).Discription = Worksheets("Lists").Range(Cells(j + 1, _
6).Address(xlA1)).Comment.Text
Next j
i get an application or object defined error when this runs. it works if i specify a single cell rather than looping through. (cells(2,6) works, but cells(i+1,6) does not, even though they refer to the same cell at the first loop)
UDT ....Summary().discription as string
For j = 1 To UBound(DefectCode())
ReDim Preserve DefectCodeSummary(1 To j)
DefectCodeSummary(j).Discription = Worksheets("Lists").Range(Cells(j + 1, _
6).Address(xlA1)).Comment.Text
Next j
i get an application or object defined error when this runs. it works if i specify a single cell rather than looping through. (cells(2,6) works, but cells(i+1,6) does not, even though they refer to the same cell at the first loop)