Hi everyone, I have an error in VBA code compiling with Excel 2013. I coded and tested on Excel 2010 and the VBA worked fine, so am stumped as to why it is not working on 2013, as I thought this was rather simple code.
Does anyone note anything that has been disallowed in Excel 2010?
Thanks,
s0up2up
Does anyone note anything that has been disallowed in Excel 2010?
Code:
Sub Group_Print()
Dim strFooter As String
Dim strFooter_date As String
Application.ScreenUpdating = False
'To add custom footer
strFooter_date = Worksheets("Header").Range("C6").Value
strFooter_date = Format(strFooter_date, "dd mmmm yyyy")
strFooter = "Marking carried out on: " & strFooter_date
Worksheets("MARKING").PageSetup.CenterFooter = strFooter
'To print preview workbook to print
Sheets(Array("MARKING", "ACTIONS", "MHL", "MHL ACTIONS", "MHL ACTIONS 2")).Select
Windows(1).SelectedSheets.PrintPreview
Worksheets("HEADER").Select
Application.ScreenUpdating = True
End Sub
Thanks,
s0up2up