Use a control array, that would be best.
Otherwise, you can refer to a control as follows:
FormName("ControlName").Property
So it'd be:
Code:Dim i As Long i = 1 Open "C:\datain.dat" For Input As #1 Do While i < lngCOUNT Line Input #1, strLine Me("Label" & i).Caption = strLine i = i + 1 Loop Close #1




Reply With Quote