Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
mrako
in reply to: yan.gauthier

Thanks Yan

 

I've already tried

Set oWorkbook = oExcel.WorkBooks.add

does not work

Set oWorkbook = oExcel.Workbooks.Add(Template:="c:\Temp\xy_Template.xls")

does not work too and show error on next command

Dim oWorkSheet As WorkSheet
Set oWorkSheet = oWorkbook.Sheets.Item(1)

Screenshot_6.pngI don't know where I'm making a mistake, but that's how it worked for me for years and still works with excel 2007 but does not work with excel 2016+Inventor 2021

 

If I run Excel manually before running the macro
that's how it works  ???

 

Sorry about my English

 

Thanks