So I currently have a problem with my code where when I run it and attempt a print view to see if my code is working, it appears as if it is copying over a whole chunk of my page 1 into every other page that is on the same sheet. The cells are linked directly and update whenever I update the cells it copies from. I'm sure it has something to do with my print title code but I'm not a good enough macroer to understand why its not working, any help would be much appreciated.
Sub Printing_Preference()
'Printer Preferences Macro Coding
Worksheets("Sheet1").Activate
ActiveSheet.PageSetup.PrintTitleRows = ActiveSheet.Rows(1).Address
ActiveSheet.PageSetup.PrintTitleColumns = _
ActiveSheet.Columns("A:H").Address 'Set the columns that have important header cells
With Worksheets("Sheet1").PageSetup 'Set the page setup below this line, all page setup values can be found here https://msdn.microsoft.com/en-us/lib.../dn254188.aspx
.BlackAndWhite = False 'True sets the printer to print in black and white, false sets the printer to print in color
.LeftMargin = Application.InchesToPoints(0.5) 'left margin in inches, normal size is 0.7
.RightMargin = Application.InchesToPoints(0.5) ' right margin in inches, normal size is 0.7
.TopMargin = Application.InchesToPoints(0.5) 'top margin in inches, normal size is 0.75
.BottomMargin = Application.InchesToPoints(0.5) 'bottom margin in inches, normal size is 0.75
.HeaderMargin = Application.InchesToPoints(0.2) 'header margin in inches, normal size is 0.3
.FooterMargin = Application.InchesToPoints(0.2) 'footer margin in inches, normal size is 0.3
.PaperSize = xlPaper11x17 'Set paper size to tabloid 11x17, other options are found at https://msdn.microsoft.com/en-us/lib.../ff839964.aspx
.PrintArea = False 'Sets printing area to be the entire workbook, in order to set this as a specific area in the workbook, see the line below
'ActiveSheet.PageSetup.PrintArea = "$A$1:$G$11" 'Set printing area to be in the range specified within the quotations
.Orientation = xlLandscape 'Sets printing orientation to Landscape, use xlPortrait to set orientation to portrait
.PrintHeadings = False 'Sets the row/column headings to print if the value is true, sets them to not print if the heading is false, i.e. Row A, Row B, Row C..etc., Column A, Column B, Column C..etc.
End With
End Sub
problem solve.PNG
Bookmarks