We can insert a new worksheet to an Excel file using below code.
ThisWorkbook.Sheets.Add
Syntax : Workbook.Add ( Before, After, Count, Type) As Object
You can mention the position of the new worksheet by playing with Before and After.
If you wish to add multiple sheets, then you can mention the number in Count
Type is required if you want to add a chart sheet.
No comments:
Post a Comment