R
Roberta
Recorded a macro to open a workbook then to preview then change settings in
page setup and when I run it I get the Compile Error.
Here's the area with an issue: It has no numbers for all but one margin ().
Seems like margin setting isn't recording. BottomMargin is highlighted.
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.29)
.RightMargin = Application.InchesToPoints()
.TopMargin = Application.InchesToPoints()
.BottomMargin = Application.InchesToPoints()
.HeaderMargin = Application.InchesToPoints()
.FooterMargin = Application.InchesToPoints()
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = 13292
End With
page setup and when I run it I get the Compile Error.
Here's the area with an issue: It has no numbers for all but one margin ().
Seems like margin setting isn't recording. BottomMargin is highlighted.
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.29)
.RightMargin = Application.InchesToPoints()
.TopMargin = Application.InchesToPoints()
.BottomMargin = Application.InchesToPoints()
.HeaderMargin = Application.InchesToPoints()
.FooterMargin = Application.InchesToPoints()
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = 13292
End With