Click to See Complete Forum and Search --> : DriveListBox problem


obijuan
February 17th, 2000, 03:00 PM
I have a drive List Box That dumps into a dir list box when selected... When you change the drive you have to double click a sub directory of a previous drive in order for it to refresh. ANyone else have this problem and know how to fix it? I have tried the refresh command on a change event of the drive list.

Juan Torres
Blue Cross Blue Shield of Florida
Configuration Management & Distribution Solutions
"Procastinating may be a bad habit, but a good tool for learning many different outcomes in life."

Johnny101
February 17th, 2000, 03:16 PM
I've haven't seen that problem but here some code that i use to do that.

'Dir1 is the directory list box.
'Drive1 is the drive list box.
'File1 is the drive list box.
private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub

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





Hope this helps,
John

John Pirkey
MCSD
www.ShallowWaterSystems.com

obijuan
February 17th, 2000, 03:40 PM
Having a little problems but thanks. Ill post my code in the morning.




Juan Torres
Blue Cross Blue Shield of Florida
Configuration Management & Distribution Solutions
"Procastinating may be a bad habit, but a good tool for learning many different outcomes in life."

Johnny101
February 17th, 2000, 05:12 PM
oops, now you see the wonderous evil of cut and paste. hehehe
File1 is obviously the FileListBox on the form. You should be able to just open a new form, place a drive, directory and file list box on the form, paste the above code and hit F5. that's all i did to make sure i didn't have any code typos.

have a good night,
John

John Pirkey
MCSD
www.ShallowWaterSystems.com