ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tab printing Macro (https://www.excelbanter.com/excel-programming/397425-tab-printing-macro.html)

Luis A. Vázquez

Tab printing Macro
 
I work on a work on a workbook that varies on the amount of tabs each
day. Im trying to make a macro that would print the amount of tabs in
each day, with the exception of sheet1.

Any Ideas?


Tom Ogilvy

Tab printing Macro
 
How about

Thisworkbook.Printout

and throw away the sheet you don't want.


Just joking:

Sub AAA()
Dim sh As Worksheet
Dim sh1 As Worksheet
Set sh1 = ActiveSheet
Worksheets(2).Select
For Each sh In Worksheets
Select Case sh.Name
Case Worksheets(1).Name
Case Else
sh.Select False
End Select
Next
ActiveWindow.SelectedSheets.PrintOut
sh1.Select
End Sub

--
Regards,
Tom Ogilvy

"Luis A. Vázquez" wrote:

I work on a work on a workbook that varies on the amount of tabs each
day. Im trying to make a macro that would print the amount of tabs in
each day, with the exception of sheet1.

Any Ideas?



Luis A. Vázquez

Tab printing Macro
 
On Sep 13, 3:10 pm, Tom Ogilvy
wrote:
How about

Thisworkbook.Printout

and throw away the sheet you don't want.

Just joking:

Sub AAA()
Dim sh As Worksheet
Dim sh1 As Worksheet
Set sh1 = ActiveSheet
Worksheets(2).Select
For Each sh In Worksheets
Select Case sh.Name
Case Worksheets(1).Name
Case Else
sh.Select False
End Select
Next
ActiveWindow.SelectedSheets.PrintOut
sh1.Select
End Sub

--
Regards,
Tom Ogilvy

"Luis A. Vázquez" wrote:
I work on a work on a workbook that varies on the amount of tabs each
day. Im trying to make a macro that would print the amount of tabs in
each day, with the exception of sheet1.


Any Ideas?


Hummm, trying to make it work but im getting error on the "sh.Select
False" line.

thanks anyway Tom.



All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com