jonnyknowsbest
Technical User
I have two very separate, very private subroutines. They both employ the following code:
Dim xlApp As New myExcel.Application
Dim xlBook As New myExcel.Workbook
Dim xlSheet As New myExcel.Worksheet
xlBook = xlApp.Workbooks.Add
xlSheet = xlBook.Worksheets.Add
One subroutine works fine, the other one fails on the "xlBook = xlApp.Workbooks.Add" line, with the following error:
Additional information: COM object with CLSID {00020819-0000-0000-C000-000000000046} is either not valid or not registered.
Please help me, this is doing my head in!!!
Dim xlApp As New myExcel.Application
Dim xlBook As New myExcel.Workbook
Dim xlSheet As New myExcel.Worksheet
xlBook = xlApp.Workbooks.Add
xlSheet = xlBook.Worksheets.Add
One subroutine works fine, the other one fails on the "xlBook = xlApp.Workbooks.Add" line, with the following error:
Additional information: COM object with CLSID {00020819-0000-0000-C000-000000000046} is either not valid or not registered.
Please help me, this is doing my head in!!!