Solved

Browse Local directories for a file

Posted on 2002-05-10
3
140 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

734 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