Printing hidden tabs from a macro

cesmythe

New Member
Joined
May 1, 2011
Messages
7
2 part questions:

1. I've read several posts but can not find the answer I need. I have 14 hidden tabs which are updated from an input sheet. When needed, I want to print them from a macro I wrote attached to a button. But, you can not print hidden tabs. How can I modify the macro to print while hidden; or to have the become visible for printing, then hide again?

2. As you can see I am using a filter. Is there a way I can "select all", then deselect just zero's - where numbers are my filter criteria and if other numbers will be added to the filter list during the course of a day. The macro covers only what numbers were present at the time I wrote the macro. e.g if number 294 was added, the macro would not recognize it.

Sub PrintMONDAY()
'
' PrintMONDAY Macro
'

'

Sheets("Mon Disp").Select
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="sean"
ActiveSheet.Range("$A$4:$O$70").AutoFilter Field:=2
ActiveSheet.Range("$A$4:$O$70").AutoFilter Field:=2, Criteria1:=Array("200" _
, "201", "202", "203", "204", "205", "206", "207", "208", "209", "210", "211", "212", "213", _
"214", "215", "216", "217", "218", "219", "220", "221", "222", "223", "224", "225", "226", _
"227", "228", "229", "230", "231", "232", "233", "234", "235", "236", "237", "238", "239", _
"240", "241", "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", "252", _
"270", "280", "281", "282", "283", "284", "285"), Operator:=xlFilterValues
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
ActiveSheet.Protect Password:="sean"
Sheets("Mon Ch-in").Select
ActiveSheet.Unprotect Password:="sean"
ActiveSheet.Range("$A$4:$J$103").AutoFilter Field:=2
ActiveSheet.Range("$A$4:$J$103").AutoFilter Field:=2, Criteria1:=Array( _
"200", "201", "202", "203", "204", "205", "206", "207", "208", "209", "210", "211", "212", _
"213", "214", "215", "216", "217", "218", "219", "220", "221", "222", "223", "224", "225", _
"226", "227", "228", "229", "230", "231", "232", "233", "234", "235", "236", "237", "238", _
"239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", _
"252", "270", "280", "281", "282", "283", "284", "285", "="), Operator:= _
xlFilterValues
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
ActiveSheet.Protect Password:="sean"
Application.ScreenUpdating = True
Sheets("Mon").Select
End Sub
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top