hip2b2
Board Regular
- Joined
- May 5, 2003
- Messages
- 135
- Office Version
- 2019
- Platform
- Windows
Is it possible to set different margins for different worksheets so other users of the Workbook don't have to fool around with those settings? I want to integrate it into the macro that generates the two report Worksheets; not to run it as part of "Print Sheet 1" or "Print Sheet 2" macros
I understand the setup code is something like this:
I hope I'm clear, and thanks for looking at my problem.
hip
I understand the setup code is something like this:
VBA Code:
ActiveSheet.PageSetup.PrintArea = myRange
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.2)
.FooterMargin = Application.InchesToPoints(0.2)
.PaperSize = xlPaperA4
.Orientation = xlPortrait 'xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
I hope I'm clear, and thanks for looking at my problem.
hip