• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

Browse Local directories for a file

I need to browse my hard drive directories to locate a file and then put that filename in a text.box.
0
larryH
Asked:
larryH
1 Solution
 
Richie_SimonettiIT OperationsCommented:
0
 
Crash2100Commented:
do you want the user to find the file, or do you want the program to find the file?

If you want the user to find the file, just add a common dialog control to your form and do something like this:

Private Sub Command1_Click()
    CommonDialog1.ShowOpen
    Text1.Text = CommonDialog1.FileName
End Sub
0
 
rspahitzCommented:
If you want the user to browse, use the common dialog control.  If you want your code to search, there are several ways, and could return multiple results with the same name.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now