Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Print Visible Sheets Macro

I would like to create a button and assign a macro that automatically prints
all visible sheets but doesn't print hidden sheets. What should the vb
syntax look like that would accomplish this and run the fastest? I want to
avoid having to provide the name of the visible sheets if possible because
there are different scenarios and I won't know what sheets are visible at any
given time. If this is not possible, I need to know how to write the syntax
to say if sheet named X is visible, then print, otherwise don't print.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 248
Default Print Visible Sheets Macro

Use
Sub printVisible()
For Each ws In Worksheets
If ws.Visible = True Then
'Your Print commands
End If
Next ws
End Sub
-------------------------------------
Pl. click ''''Yes'''' if this was helpful...



"Lisa C." wrote:

I would like to create a button and assign a macro that automatically prints
all visible sheets but doesn't print hidden sheets. What should the vb
syntax look like that would accomplish this and run the fastest? I want to
avoid having to provide the name of the visible sheets if possible because
there are different scenarios and I won't know what sheets are visible at any
given time. If this is not possible, I need to know how to write the syntax
to say if sheet named X is visible, then print, otherwise don't print.

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
macro to print sheets from wrkbk only if data has been typed in Brian Excel Discussion (Misc queries) 3 February 16th 08 02:19 PM
Macro to select and print sheets JoeP Excel Discussion (Misc queries) 3 April 19th 07 06:44 PM
Print Macro both sheets at once with option to select days etc pano Excel Worksheet Functions 0 January 29th 07 04:09 AM
Newbie seeks suggestion on recording new macro to print sheets Vivian New Users to Excel 2 May 10th 06 06:53 AM
Autoshapes not visible on spreadsheet but visible in print preview John Excel Discussion (Misc queries) 3 February 11th 05 10:23 PM


All times are GMT +1. The time now is 12:35 PM.

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

About Us

"It's about Microsoft Excel"