![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
I've written this loop to modify the page setup for each page I need to print. When i step through it, it does indeed go to each page, but when it's done and I manually check the settings, the FitToPages...settings never stick. The footer is fine, but I can't tell it to print each page on ONE page. Anyone think they can help? I got the code from a recorded macro.
For ContentCtr = 3 To (SheetCounter + 1) 'SheetCounter is defined earlier as thhe number of sheets I'm interested in Sheets(ContentCtr).Select ActiveSheet.PageSetup.PrintArea = "" ActiveSheet.PageSetup.FitToPagesWide = 1 ActiveSheet.PageSetup.FitToPagesTall = 1 ShtNum = ContentCtr Sheets(ContentCtr).PageSetup.RightFooter = "Page " & ShtNum Next ContentCtr |
|
|
|
|
|
#2 |
|
.
Join Date: Feb 2002
Location: Akron, Ohio USA
Posts: 789
|
You need to set the .Zoom to False.
ActiveSheet.PageSetup.Zoom = False The recorded macro should have done that for you. I realize many of those recorded lines are extraneous, but that one is necessary. Bill _________________ MrExcel.com Consulting [ This Message was edited by: MrExcel on 2002-04-11 07:57 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
Perfect.
I don't know where you pick up these things, but that certainly did the trick. Thanks. JrnyMan Youngstown, Ohio (presently in London) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|