I'm having trouble opening my excel sheet via the call shell commang my code is pretty simple as follows but I can't seem to get access to recognise the folder.
This works but only because the target file does not sit in a folder. Any ideas??
Private Sub CmdOpenXlFile_Click()
On Error GoTo Errhndl
Dim stAppName As String
stAppName = "C:\Program Files\MSOFFICE\Excel\EXCEL.EXE C:\accesstest.xls"
Call Shell(stAppName, 1)
Exitcmd:
Exit Sub
Errhndl:
MsgBox err.Description
Resume ExitCmd
End Sub
This works but only because the target file does not sit in a folder. Any ideas??
Private Sub CmdOpenXlFile_Click()
On Error GoTo Errhndl
Dim stAppName As String
stAppName = "C:\Program Files\MSOFFICE\Excel\EXCEL.EXE C:\accesstest.xls"
Call Shell(stAppName, 1)
Exitcmd:
Exit Sub
Errhndl:
MsgBox err.Description
Resume ExitCmd
End Sub