I am running a VB application from within TurboCad, where I need to open a specific Excel spreadsheet.
With the code below this happens OK.
However, With the same code I cannot open the Excel file I require.
The code runs to the end without error.
Excel has launched and has a window with nothing in it, not even a blank spreadsheet.
What am I doing wrong to prevent the Excel spreadsheet from loading.
I would appreciate your advise.
Sub Openfile()
Activate = Shell("C:\Program Files\Microsoft Office\Office\excel.exe", 1) ' Run Microsoft Excel.
ChDir _
"C:\Documents and Settings\Personal\My Documents\Mech\Turbo Cad test"
Workbooks.Open Filename:= _
"C:\Documents and Settings\Personal\My Documents\Mech\Turbo Cad test\Testing 1.xls"
Worksheets("Sheet1").Activate
Range("A1").Select
End Sub
kevsim
With the code below this happens OK.
However, With the same code I cannot open the Excel file I require.
The code runs to the end without error.
Excel has launched and has a window with nothing in it, not even a blank spreadsheet.
What am I doing wrong to prevent the Excel spreadsheet from loading.
I would appreciate your advise.
Sub Openfile()
Activate = Shell("C:\Program Files\Microsoft Office\Office\excel.exe", 1) ' Run Microsoft Excel.
ChDir _
"C:\Documents and Settings\Personal\My Documents\Mech\Turbo Cad test"
Workbooks.Open Filename:= _
"C:\Documents and Settings\Personal\My Documents\Mech\Turbo Cad test\Testing 1.xls"
Worksheets("Sheet1").Activate
Range("A1").Select
End Sub
kevsim