Hi All,
I have a problem when i tried to run a macro with the following sentence "ActiveSheet.VPageBreaks(1).DragOff". Attached is the excel file that i'm using; do you know if something is missing?![]()
![]()
![]()
I want to setup a print area from "B11" to "G74" or there is another way to set a print area with a macro for multiple sheets?
Part of the code
https://dl.dropboxusercontent.com/u/85562478/Recibo.xlsPHP Code:
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = "$B$11:$G$74"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0.47)
.BottomMargin = Application.InchesToPoints(0)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -4
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
'ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1
End With
Hope you know the answer.
Thanks,
Bookmarks