laurenh345
New Member
- Joined
- Mar 13, 2020
- Messages
- 19
- Office Version
- 2007
- Platform
- Windows
Hi,
Can someone please help me. I have an excel sheet with 150+ tabs and I need the following conditions to be met and looped through every tab.
1. every tab to print in landscape form
2. fit all columns to the width of one page.
3. repeat rows $1:$2 at the top of every page(since a tab can consist of multiple pages when printed.)
I came up with the following VBA but I need it to loop through every tab in the workbook. Thanks in advance for any help on this!
Sub FITPAGESTO_ONEPAGE()
With ActiveSheet.PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
Sheets(sh).PageSetup.Orientation = xlLandscape
End With
End Sub
Can someone please help me. I have an excel sheet with 150+ tabs and I need the following conditions to be met and looped through every tab.
1. every tab to print in landscape form
2. fit all columns to the width of one page.
3. repeat rows $1:$2 at the top of every page(since a tab can consist of multiple pages when printed.)
I came up with the following VBA but I need it to loop through every tab in the workbook. Thanks in advance for any help on this!
Sub FITPAGESTO_ONEPAGE()
With ActiveSheet.PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
Sheets(sh).PageSetup.Orientation = xlLandscape
End With
End Sub