|Subject:||Open File using Variable Path?|
|Posted by:||Jason Gyetko (jason.gyet…@epower-inc.com)|
|Date:||23 Aug 2006|
I'm trying to open a file from VBA using a variable path and am not
having very much luck. Can anyone help?
retval = Shell("""Excel.EXE"" ""C:\Program files\MyPath\MyFile.xls""",
This does not like the space in 'Program Files':
retval = Shell("Excel.EXE " & Application.CurrentProject.Path &
I've tried quotation marks all over the place in all sorts of
combinations and cannot get it to work. With the above example I get
the following message:
'C:\Program.xls' could not be found...
That one is immediately followed by:
'Files\MyPath\MyFile.xls' could not be found.
Thanks in advance for any suggestions.