I am trying to using the following method to open an Excel workbook (2008.xls) which did not work.
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Sub OpenWB ShellExecute(0, "Open", "C:\2008.xls", vbNullString, vbNullString, 1) End Sub
After running the procedure OpenWB, Excel will halt and the only way I can close Excel is through the windows task manager. By the way, I have applied service pack 3 for Excel.
Thanks for any advice.