Hi, A quick question. I have been battling with this code all morning,
please help.
Here is the code
Dim fPath1 As String
Dim fPath2 As String
fPath1 = "C:\Program Files\Microsoft Office\Office\E XCEL.EXE"
fPath2 = "C:\Documen ts and Settings\jennif err\My Documents\Gener ic
report.xls"
'This opens Excel, but not the spreadsheet I need to open
OpenExcel = Shell(fPath1, vbMaximizedFocu s)
'This and all the other stuff I have tried generates the error
"Invalid proceedure call or argument"
OpenExcel = Shell("C:\Docum ents and Settings\jennif err\My
Documents\Gener ic report.xls", vbMaximizedFocu s)
I have tried all sorts of other combinations of code to open Generic
report.xls, but to no avail. I am sure it is a silly syntax error,
but I quite simply do not know what. Thanks in advance for any
comments.
please help.
Here is the code
Dim fPath1 As String
Dim fPath2 As String
fPath1 = "C:\Program Files\Microsoft Office\Office\E XCEL.EXE"
fPath2 = "C:\Documen ts and Settings\jennif err\My Documents\Gener ic
report.xls"
'This opens Excel, but not the spreadsheet I need to open
OpenExcel = Shell(fPath1, vbMaximizedFocu s)
'This and all the other stuff I have tried generates the error
"Invalid proceedure call or argument"
OpenExcel = Shell("C:\Docum ents and Settings\jennif err\My
Documents\Gener ic report.xls", vbMaximizedFocu s)
I have tried all sorts of other combinations of code to open Generic
report.xls, but to no avail. I am sure it is a silly syntax error,
but I quite simply do not know what. Thanks in advance for any
comments.
Comment