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

dir list box and drive list box

Status
Not open for further replies.

vbpadawan

Programmer
Oct 8, 2002
28
US
I know this is an easy question but I forgot how to do this. How do you change the drive in the dir list box after you have selected it in the drive list box.
Thanks.
 
Hi

Try

Code:
Private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
End Sub

Hope this helps

David
 

In the change event of the DriveListBox you would set the Path of the DirectoryListBox = DriveListBox.Drive and if you are using a FileListBox you would set the Path of the FileListBox = to the path of the DirectoryListBox in the change event of the DirectoryListBox.
[tt]
Option Explicit

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub

Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
[/tt]

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top