Combobox problem

wilbert
09-10-2003, 08:24 AM
I want add all the filenames in a certain directory to a combobox, so the user can choose one of them. How do I do this?

Thanks,
Wilbert

reboot
09-10-2003, 08:26 AM
Loop through the files in the directory with Dir$ and .AddItem them to the combobox.

wilbert
09-10-2003, 08:49 AM
How do I loop through a directory with dir$?

Wilbert

pradeep
09-10-2003, 08:55 AM
You can do it using FileListBox control.

Place FileListBox on the form and set Directory path.

Private Sub Form_Load()
File1.Path = "c:\FolderName"
End Sub

wilbert
09-10-2003, 08:57 AM
No, it must be done in a combobox :D, so I have to use the dir$ function, but I don't know how

OnErr0r
09-10-2003, 08:59 AM
http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctdirx.asp

wilbert
09-10-2003, 09:08 AM
Thanks onerror, i'll give it a try!:D

Wilbert

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum