regtlib "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" Or use:

' Early binding requires reference to Microsoft Excel 12.0 Object Library ' Dim xlApp As Excel.Application ' Set xlApp = New Excel.Application

xlWS.Cells(1, 1).Value = "Hello from VB6 with Excel 12.0" xlWB.SaveAs "C:\Test.xlsx", 51 ' 51 = xlOpenXMLWorkbook xlApp.Quit