I have created a named print range (dynamic range) that I want to create a VBA trigger button to print the named print range. I have attempted to create the VBA coding but end up with errors.
Sub PrintCells()
With Sheet6
.PageSetup.PrintArea = Range("PAYROLL_DEDUCTION_NOTIFICATION")
.PrintOut
End With
End Sub
I am struggling with how to use the named print range to preserve the dynamic nature. Excel has a bug in that if you reference the dynamic print range and someone makes any changes to the printer options the print range is converted to the last fixed range that was used. If I can call the named range when using the VBA code to print the dynamic range will always be valid. Any solution for using VBA to print the named range is appreciated.
Sub PrintCells()
With Sheet6
.PageSetup.PrintArea = Range("PAYROLL_DEDUCTION_NOTIFICATION")
.PrintOut
End With
End Sub
I am struggling with how to use the named print range to preserve the dynamic nature. Excel has a bug in that if you reference the dynamic print range and someone makes any changes to the printer options the print range is converted to the last fixed range that was used. If I can call the named range when using the VBA code to print the dynamic range will always be valid. Any solution for using VBA to print the named range is appreciated.