VBA Group Print not working on EXCEL 2013

s0up2up

Board Regular
Joined
Jan 30, 2012
Messages
84
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?

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
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top