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

simply change your code like this:

 

set oWorkbook = oExcel.WorkBooks.add

 

Also, a Workbook created from VBA does not contain any sheets. you must add them first