PDA

Click to See Complete Forum and Search --> : Get filename or filepath from Dialog(xlDialogOpen)?


mchow2469
Aug 12th, 2005, 11:36 AM
Hi, I have an older version of Excel, i.e. 2000

Only way I can use the openfile dialog is the dialog class with xlDialogOpen constant. Anyways, I was wondering how to get the filename or filepath when I open a file using this class?
I tried to see what it returns, and it returns true or false?
any help? thanks.

mchow2469
Aug 12th, 2005, 12:22 PM
Nevermind,

I found the function getOpenFilename() which returns the filepath and name of hte file opened.
Thanks anyways!

RobDog888
Aug 12th, 2005, 12:51 PM
Here is one way to use the dialog, fyi.
Dim oDlg As Dialog
Set oDlg = Application.Dialogs(xlDialogOpen)
With oDlg
.Show arg1:="FileText", arg2:=False, arg3:=False
End With
'file_text, update_links, read_only, format, prot_pwd, write_res_pwd, ignore_rorec,
'file_origin, custom_delimit, add_logical, editable, file_access, notify_logical, converter