|
-
Dec 12th, 2001, 12:50 AM
#1
Thread Starter
Lively Member
Dir,list box help
Can anyone help with this?
I have a form with a drive box
i have a directory list box below that
and a file list box below that
I want to have the directory list box load the path that i want the user to use.Then i'm looking to have the file list box show the files in the Directory.
I can e mail the vb files that i've started on.
Thanks all
me
-
Dec 12th, 2001, 01:34 AM
#2
Dir,list box help
Use this code. It might help.
Private Sub Drive1_Change()
On Error Resume Next
Dir1.Path = Drive1.Drive
End Sub
Private Sub Dir1_Change()
On Error Resume Next
File1.Path = Dir1.Path
End Sub
If you wants to filter the display file of File1 control, you can use
File1.Pattern = "*.asp;*.zip"
-
Dec 12th, 2001, 07:44 AM
#3
If you want a specific folder to be defaulted at run time then this should do it.
VB Code:
Private Sub Form_Load()
Drive1.Drive = "C:"
Dir1.Path = "c:\program files\myfolder"
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
-
Dec 12th, 2001, 07:54 AM
#4
Hyperactive Member
Can you please also take a look to this one?
Error trapping
Thanx
Last edited by mvrp350; Dec 12th, 2001 at 08:12 AM.
-
Dec 12th, 2001, 08:13 AM
#5
Hyperactive Member
sorry guys, just redirected the link in the previous post
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|