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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP-Display content of directory displayed in comboBox in FileListBox

Status
Not open for further replies.

robbaggio

Programmer
Jun 11, 2002
31
US
Lets say i have a combobox called cmbPath that has options of paths of different directorys, and I want to display(dir command) the contents of the selected directory in a FileListBox called dirFiles.

How do I do that, so that whenever a different path choice is made in the combobox, the respective files for that directory are displayed in the FileListBox.

I was trying stuff like:

dirFiles.Path = cmbPath.ListIndex

but didnt work

any help would be greatly appreciated.

thanks

robbaggio
 
Do:

dirFiles.Path = cmbPath.List(cmbPath.ListIndex)

This assumes that you have the full path (including the drive letter) in your combo box. If not, it won't work.

- Andy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top