Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For ll = 0 To File3.ListCount - 1 1

Status
Not open for further replies.

kennedymr2

Programmer
May 23, 2001
594
AU
Is there any way of making the File3. variable

Ie i want to run the for.... using eg File3. File4. File5. etc


For ll = 0 To File3.ListCount - 1

vvv="File3"
?? For ll = 0 To vvv.ListCount - 1

Appreciate any help


Regards Kennedymr2
 
Its all ok seem to have worked it out

Dim fld As String: fld = "File3"
For ll = 0 To Controls(fld).ListCount - 1


Regards Kennedymr2
 
I guess we are talking about FileListBoxes so how about putting them in a Control Array. Then you can then, OTTOMH, do something like;

For i = 0 to MyFileList.Count-1
For j = 0 to MyFileList(i).ListCount-1
'do the stuff
Next
Next
 
HughLerwill

Thanks... yes .... a much better idea..


Regards Kennedymr2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top