GetOpenFileName returns the path and the file name.
I have never seen your particular Open method used in Excel.
If oApp is an Excel application object then this might be more appropriate...
vFileName = oApp.GetOpenFilename()
If vFileName <> False Then oApp.Workbooks.Open vFileName
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
"Lance Hoffmeyer"
wrote in message
Hey all,
I can set a filename with
sFileName = Application.GetOpenFilename
Is there a similar way to set the path as a variable?
Currently I am using a command:
Set oDoc = oAPP.OpenDataDoc("C:\January\File.xls")
with a bunch of editting to File.xls
I would like to change this to
Set oDoc = oAPP.OpenDataDoc(strPATH + "File.xls")
where I have opened some sort of dialog to set the Path for the current month.
Thanks in advance,
Lance