Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Browse Local directories for a file

Posted on 2002-05-10
3
Medium Priority
?
143 Views
Last Modified: 2010-05-02
I need to browse my hard drive directories to locate a file and then put that filename in a text.box.
0
Comment
Question by:larryH
3 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7001900
0
 
LVL 18

Accepted Solution

by:
Crash2100 earned 400 total points
ID: 7001936
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
 
LVL 22

Expert Comment

by:rspahitz
ID: 7001937
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question