Expand|Select|Wrap|Line Numbers
- Dim ExcelSheet As Object
- Set ExcelSheet = CreateObject("Excel.Sheet")
- ExcelSheet.Application.Visible = True
- ExcelSheet.Application.Cells(1, 1).Value = "Customer"
- ExcelSheet.Application.Cells(1, 2).Value = [CustomerName]
- 'Again repeated lots of times for various different values
- ExcelSheet.Application.ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
- ExcelSheet.SaveAs mdrive & mdir & "\" & [CustomerName] & "\" & [JobSiteName] & " - " & [JobNumber] & "\a. Site Details\SiteDetails.xlsx"
- ExcelSheet.Application.Quit
- Set ExcelSheet = Nothing
Any ideas how to get more than 1 sheet to be created in the same document?
Thanks!