33% off ends soon:GMAT/GRE prep + applications bundle. Profile building, longer mentoring, better results. Inquire

INQUIRE
INQUIRE

' Save the workbook xlWorkbook.SaveAs "C:\Example.xlsx"

' Create a new workbook Set xlWorkbook = xlApp.Workbooks.Add

If you have Microsoft Office 2016 or later installed, you can follow these steps:

Set xlWorksheet = Nothing Set xlWorkbook = Nothing Set xlApp = Nothing

MsgBox "Data exported successfully to C:\Temp\VB6_Export.xlsx", vbInformation

Covered by…