Excel Tutorials | Printing Macro Code

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

Read More »

Print Selection

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

Read More »

Print Narrow Margin

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

Read More »

Print Comments

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

Read More »