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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show dialog

Status
Not open for further replies.

kingz2000

Programmer
May 28, 2002
304
DE
Hi,

can someone tell me the function I need to show a dialog for a user to enter a file path, say..

Thanks in advance
 
Do you mean just the file path? Or do you mean file path and file name?

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
I mean filepath & filename...

Basically, the user is supposed to select a csv.file, and in my code I need the path & filenmae of the file.
 
Have a look at the Application.GetOpenFilename method in Excel VBA.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi,

when I tried the procedure below, I got the error 'Method or data object not found' on 'GetOpenFilename'. What did I do wrong?


Private Sub command5_Click()

Dim varRetVal As Variant

varRetVal = Application.GetOpenFilename( _
FileFilter:="Microsoft Excel-files(*.xls), *.xls", _
Title:="a file to open")

If varRetVal = False Then Exit Sub

On Error Resume Next
Workbooks.Open FileName:=varRetVal
On Error GoTo 0


End Sub


 
What did I do wrong?
Perhaps playing with a too old version of XL ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
..I mean Office 2000....hence Microsoft Access is also up-to date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top