galileogali
Well-known Member
- Joined
- Oct 14, 2005
- Messages
- 748
Since Word I open Excel, but if it was already open I would like to assign it to an object with this code
However, still open Excel
xlp is Nothing
What I Have wrong????
Code:
On Error Resume Next
Set xlp = GetObject(Application.Path & "\EXCEL.EXE", "Excel.Application")
If xlp Is Nothing Then
Set xlp = CreateObject("Excel.Application")
End If
However, still open Excel
Code:
Set xlp = GetObject(Application.Path & "\EXCEL.EXE", "Excel.Application")
xlp is Nothing
What I Have wrong????