ThisWorkbook.Print question
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 |
ThisWorkbook.Print question
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 On Mon, 19 Nov 2007 07:38:03 -0800, Dave wrote: 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 |
All times are GMT +1. The time now is 12:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com