Print Custom Pages
Sub printCustomSelection() Dim startpage As Integer Dim endpage As Integer startpage = _ InputBox(“Please Enter Start Page number.”, “Enter Value”) If Not WorksheetFunction.IsNumber(startpage) Then MsgBox
Sub printCustomSelection() Dim startpage As Integer Dim endpage As Integer startpage = _ InputBox(“Please Enter Start Page number.”, “Enter Value”) If Not WorksheetFunction.IsNumber(startpage) Then MsgBox
Sub printSelection() Selection.PrintOut Copies:=1, Collate:=True End Sub Excel Macro code to Print Selection in Excel sheet. This code will help you print selected range. You
Sub printNarrowMargin() With ActiveSheet.PageSetup .LeftMargin = Application .InchesToPoints (0.25) .RightMargin = Application.InchesToPoints(0.25) .TopMargin = Application.InchesToPoints(0.75) .BottomMargin = Application.InchesToPoints(0.75) .HeaderMargin = Application.InchesToPoints(0.3) .FooterMargin = Application.InchesToPoints(0.3) End
Print Comments Sub printComments() With ActiveSheet.PageSetup .printComments = xlPrintSheetEnd End With End Sub VBA macro code for Print Comments. Use this macro to activate settings
Get organized with our free, customizable Excel templates
© 2023 xlsxtemplates all rights reserved