Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,388
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile error in hidden module: thisworkbook Tran Thu Do Excel Discussion (Misc queries) 3 June 4th 12 10:33 AM
Problem with ThisWorkbook.RefreshAll Vick Excel Discussion (Misc queries) 3 September 7th 07 12:26 AM
ThisWorkbook of personal.xls Jack Sons Excel Discussion (Misc queries) 4 August 29th 07 04:28 PM
Compile error in hidden module: ThisWorkbook Lloyd Excel Discussion (Misc queries) 1 May 27th 05 11:39 PM
Compile error in hidden module: ThisWorkbook Peo Sjoblom Excel Discussion (Misc queries) 0 May 27th 05 09:50 PM


All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"