Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to print sheets from wrkbk only if data has been typed in | Excel Discussion (Misc queries) | |||
Macro to select and print sheets | Excel Discussion (Misc queries) | |||
Print Macro both sheets at once with option to select days etc | Excel Worksheet Functions | |||
Newbie seeks suggestion on recording new macro to print sheets | New Users to Excel | |||
Autoshapes not visible on spreadsheet but visible in print preview | Excel Discussion (Misc queries) |