I have created and populated an Excel workbook with 3 worksheets. Sheet1 contains data; Sheet2 and Sheet3 are empty. I massage the data in Sheet1 and enter the output into Sheet2. I would now like to delete Sheet1 and close and save the Excel file.
I am embarressed to say I can't figure out how to delete a worksheet from an Excel spreadsheet in VB6. Hope you can help me out!
dim xl as new excel.application
dim wb as excel.workbook
If wb.worksheets.count > 1
wb.worksheets(1).delete End If