Hi, I wonder whether someone could help me please.
I'm using the code belwo to automatically create new worksheets within my Excel workbook and run a number of macros.
Sub CreateNewSheets()
Dim shArray() As Variant 'Declare the sheet Name array and a
Dim i As Long 'counter variable
Application.ScreenUpdating = False
shArray = Array("CTO Monthly Direct", _
"CTO Monthly Enhancements", _
"CTO Monthly Indirect", _
"CTO Monthly Overheads", _
"CTO Monthly Projects", _
"CTO Yearly Direct", _
"CTO Yearly Enhancements", _
"CTO Yearly Indirect", _
"CTO Yearly Overheads", _
"CTO Yearly Projects", _
"CTO In Flight Projects", _
"Weekly CTO Actuals Graph Data", _
"CTO Flexible Resources KPI", _
"B&C Remaining Allocation", _
"BT Remaining Allocation", _
"C&I Remaining Allocation", _
"Corp Remaining Allocation", _
"E&C Remaining Allocation", _
"PT Remaining Allocation", _
"BT Activity End Dates", _
"C&I Activity End Dates", _
"Corp Activity End Dates", _
"E&C Activity End Date", _
"PT Activity End Dates") 'Populate the array
For i = LBound(shArray) To UBound(shArray) 'Loop through the elements
Sheets.Add(After:=Worksheets(Worksheets.Count)).Name = shArray(i)
Next
Call MonthlySheetHeaders
Call MonthlyExtract
Call MonthlyFormat
Call MonthlySubtotals
End Sub
The problem I have is thast I'd like to create some more sheets and addb them to the first part of the code, but I'm receiving the error "Too many line continuations'.
The error is self explanatory, but I'm not sure how to overcome this.
I just wondered whether someone could possibly look at this please and offer some guidance on how I may overcome this.
Many thanks and kind regards
Chris
Bookmarks