Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,849
- Office Version
- 2016
- Platform
- Windows
Here is the problem. When I try opening the file "C:\MyBook.xls" in a second excel instance via the above API function not only does it not open the file it also blocks the keyboard on the current application ! - I get no error message .
Has anybody experienced this before ? I have tried many variations of this API but to no avail.
API code:
However, the two following traditional methods work as they should :
Regards.
Has anybody experienced this before ? I have tried many variations of this API but to no avail.
API code:
Code:
ShellExecute 0, _
"Open", "C:\Mybook.xls", vbNullString, _
vbNullString, SW_SHOWMAXIMIZED
However, the two following traditional methods work as they should :
Code:
Shell "excel" & Chr(32) & _
"C:\Mybook.xls", vbMaximizedFocus
Code:
With CreateObject("Excel.Application")
.Visible = True
.Workbooks.Open "C:\Mybook.xls"
End With
Regards.