knookie
knookie

Reputation: 8263

vbscript excel creating worksheets

excel 2007

i have the following which happily creates a workbook and worksheet. How can i create another worksheet in the same workbook?

Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = False

Set XLDoc = objExcel.Workbooks.Add

Set XLSheet = XLDoc.Worksheets(1)

Upvotes: 2

Views: 8815

Answers (1)

nimizen
nimizen

Reputation: 3429

    objExcel.ActiveWorkbook.Worksheets.Add

Upvotes: 4

Related Questions