Is there a way to include a path (S:\A\B\C\D) in GetOpenFilename so users don't have to work their way down to the appropriate directory to select a file?
Thanks in advance for your help.
Elaine
Is there a way to include a path (S:\A\B\C\D) in GetOpenFilename so users don't have to work their way down to the appropriate directory to select a file?
Thanks in advance for your help.
Elaine
Re: GetOpenFilename
Quote from ElaineIs there a way to include a path (S:\A\B\C\D) in GetOpenFilename so users don't have to work their way down to the appropriate directory to select a file?
Thanks in advance for your help.
Elaine
Elaine
Look up
ChDrive
ChDir
Also remember to restore current Directories back to what they were.
Re: GetOpenFilename
Hi Elaine
With reference to Ivan's reply above, I've recently used the following code . Hope it helps.
ChDrive "c:\"
ChDir "c:\APPS\NIS"
NewFN = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls), *.xls", Title:="Please select a file")
If NewFN = False Then
' They pressed Cancel
MsgBox "Stopping because you did not select a file"
Exit Sub
Else
Workbooks.Open Filename:=NewFN
End If
Display More
Re: GetOpenFilename
Thanks Ivan!
It works great.
Sorry for the late reply.
Elaine
Don’t have an account yet? Register yourself now and be a part of our community!