Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm writing a macro from MS Project that changes Excel PageSetup prior
to exporting data to it. All of my PageSetup commands are working except the ones to change margins. Can anyone tell me why, please? 'Set up Excel page header and footer, orientation, margins, and titles With xlBook.Worksheets(1).PageSetup .LeftMargin = Application.InchesToPoints(0.5) .RightMargin = Application.InchesToPoints(0.5) .TopMargin = Application.InchesToPoints(0.5) .BottomMargin = Application.InchesToPoints(0.5) .HeaderMargin = Application.InchesToPoints(0.25) .FooterMargin = Application.InchesToPoints(0.25) .RightFooter = "&""Arial,Italic""xls1.Name" .CenterFooter = "&""Arial,Italic""&8Page &P of &N" .RightFooter = "&""Arial,Italic""&8&D &T" .Orientation = xlLandscape .PaperSize = xlPaperLegal .CenterHorizontally = True .PrintTitleRows = "$1:$5" .PrintTitleColumns = "A$:E$" End With Thanks, Caroline |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Are margins in Excel variable? | Excel Discussion (Misc queries) | |||
excel margins | Excel Worksheet Functions | |||
Excell error "Can't find Project or Library" Project VBAProject | Excel Worksheet Functions | |||
How to convert MS Project to MS Excel. I don't have MS Project. | Excel Discussion (Misc queries) | |||
Problems with Margins in Excel | Excel Discussion (Misc queries) |