doctorswamp
Technical User
Hi
Want to send data to Excel but keep getting multiple instances of Excel starting if I use
GetObject("","Excel.Application") in the code below.
Without the first double quote I get Error 429 and debug highlights the GetObject line.
Any help much appreciated.
***************
Dim objXL As Object
Dim objWkb As Excel.Workbook
Dim objSht As Excel.Worksheet
On Error Resume Next
Set objXL = GetObject(, "Excel.Application")
If Err <> 0 Then
Set objXL = CreateObject("Excel.Application")
End If
objXL.Visible = True
Set objWkb = objXL.Workbooks.Open("c:\ics.xlt")
etc
Want to send data to Excel but keep getting multiple instances of Excel starting if I use
GetObject("","Excel.Application") in the code below.
Without the first double quote I get Error 429 and debug highlights the GetObject line.
Any help much appreciated.
***************
Dim objXL As Object
Dim objWkb As Excel.Workbook
Dim objSht As Excel.Worksheet
On Error Resume Next
Set objXL = GetObject(, "Excel.Application")
If Err <> 0 Then
Set objXL = CreateObject("Excel.Application")
End If
objXL.Visible = True
Set objWkb = objXL.Workbooks.Open("c:\ics.xlt")
etc