I want to make a loop to replace this.
With frmtemp
.Text(0) = strCell(0)
.Text(1) = strCell(1)
.Text(2) = strCell(2)
.Text(3) = strCell(3)
.Text(4) = strCell(4)
End With
Any help would be greatly appreciated.
Printable View
I want to make a loop to replace this.
With frmtemp
.Text(0) = strCell(0)
.Text(1) = strCell(1)
.Text(2) = strCell(2)
.Text(3) = strCell(3)
.Text(4) = strCell(4)
End With
Any help would be greatly appreciated.
Try:Code:Dim lIndex As Long
For lIndex = 0 To 4
frmTemp.Text(lIndex) = strCell(lIndex)
Next
Dim I as integer
With frmTemp
For I = 0 to 4 step 1
.text(I)=strCell(I)
next I
end with
Thanks very much guys, I'm new at this and loops are not one of my stonger points.