Macro Help

  • Thread starter Thread starter cvgairport
  • Start date Start date
C

cvgairport

I am trying to craft a macro that will print assorted sheets in a single
excel file. I have written the one below but it won't run. Any help would
be appreciated.

Amy

Sub Final()
'
' Final Macro
' Macro recorded 10/26/2009 by
'
' Keyboard Shortcut: Ctrl+f
'
Sheets("Dashboard").Select
PrintOut Copies:=1, Collate:=True
Sheets("Parameters").Select
PrintOut Copies:=1, Collate:=True
End Sub
 
Try the below. You can add more sheets to the array

Sub Final()
Sheets(Array("Dashboard", "Parameters")).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

If this post helps click Yes
 
Worked great! Thanks!

Jacob Skaria said:
Try the below. You can add more sheets to the array

Sub Final()
Sheets(Array("Dashboard", "Parameters")).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

If this post helps click Yes
 
Back
Top