I've got a big ole excel file with 504 sheets, 500 of which are identical with tab names of 1 through 500 and have two buttons on each sheet. Unfortunately, those buttons were supposed to have macros attached to them but it didn't work. Can anyone help me attach macros to the two buttons across all worksheets?
Button 1 should have this:
Sub Print_PO()
ActiveSheet.PageSetup.PrintArea = "A3:I47"
Application.CommandBars.ExecuteMso ("PrintPreviewAndPrint")
End Sub
And Button 2 should have this:
Sub Print_Receipt()
ActiveSheet.PageSetup.PrintArea = "K3:T52"
Application.CommandBars.ExecuteMso ("PrintPreviewAndPrint")
End Sub
Button 1 should have this:
Sub Print_PO()
ActiveSheet.PageSetup.PrintArea = "A3:I47"
Application.CommandBars.ExecuteMso ("PrintPreviewAndPrint")
End Sub
And Button 2 should have this:
Sub Print_Receipt()
ActiveSheet.PageSetup.PrintArea = "K3:T52"
Application.CommandBars.ExecuteMso ("PrintPreviewAndPrint")
End Sub