Macro Copy
Posted by Rob on August 15, 2001 12:22 PM
I have a sheet with a button, linked to a macro which prints. This sheet is being copied (like a template) then data being put in. The new copied sheets have buttons, but the buttons are not linked to print. Is there a way to do this automatically? Or maybe modify my print code so that 1 macro works for the active sheet? heres my code.
Sub PrintMacro2()
Dim rPrintRange As Range
If Range("A3") = "" Then Exit Sub
Set rPrintRange = Range("A1", Range("H65536").End(xlUp))
With ActiveSheet.PageSetup
.PrintArea = rPrintRange.Address
.FitToPagesTall = 1
.FitToPagesWide = 1
.Orientation = xlLandscape
End With
Set rPrintRange = Nothing
ActiveSheet.PrintOut
ActiveSheet.DisplayPageBreaks = False
End Sub
Thanks