ThisWorkbook.Print question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone!

I want to write a line into a macro that will print all worksheets in a
workbook, apart from a sheet called "HOME".

Can anyone tell me how to do this?

Thanks
Dave
 
Private Sub Workbook_BeforePrint(Cancel As Boolean)
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "HOME" Then ws.PrintOut
Next ws
End Sub


Gord Dibben MS Excel MVP
 
Back
Top