Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open File Dialog

Status
Not open for further replies.

rudejohn

IS-IT--Management
Jul 11, 2003
130
US
I'm trying to write an application to read contents of folders, then create a text file with specific data about these folders. First, I need to input the user's preferred location.

I have limited off-and-on experience with Visual Basic over the years. I've searched on MSDN and on some threads in this site... specifically:
thread222-886799

What I need to do is click a button. Get a dialog box where user can select a folder (not a file, necessarily). Once user clicks "OK", the path to that folder is put into a text box. In the code below, what exactly is "FileOpenDlg"? Is this a standard function, or was this user-written?

Private Sub cmdBrowse_Click()
Dim strFileLocation
Dim FileOpenDlg
FileOpenDlg.ShowOpen
strFileLocation = FileOpenDlg.FileName
txtInputLocation.Text = strFileLocation
End Sub

I know this is probably a very simple question. Perhaps my searching skills aren't refined enough?

~rj

************
RudeJohn
************
 
Sorry... kept fighting with the search engine until I found the right keywords, and then answered my own question. Thanks for your help anyway. Can I delete my thread? :)

************
RudeJohn
************
 
ShowOpen is a method of the CommonDialog control...

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Thank you for your help, johnwm.

************
RudeJohn
************
 
You CAN delete your own thread in a manner of speaking. Just click the "red flag it" link and it will as you why. Just say why you want the thread deleted and they will usually oblige.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top