Solved

Browse Local directories for a file

Posted on 2002-05-10
3
128 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 100 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now