Josh Hebert
New Member
I created a print button using 2 modules that need to exist in multiple workbooks.
When I created the button using the module in the original workbook, it was fine.
When I create a new workbook using "Save As", and rename as a new workbook, the print button always brings up the original workbook when I use it.
Can I alter the code on the module to only refer to the active sheet the button exists within?
The 2 buttons have the code listed as follows:
>>> use code - tags <<<
and
When I created the button using the module in the original workbook, it was fine.
When I create a new workbook using "Save As", and rename as a new workbook, the print button always brings up the original workbook when I use it.
Can I alter the code on the module to only refer to the active sheet the button exists within?
The 2 buttons have the code listed as follows:
>>> use code - tags <<<
Code:
Sub PrintSomeCells()
Range("A2:Y45").PrintOut
End Sub
Code:
Sub PrintSomeCells()
Range("Z2:AX45").PrintOut
End Sub
Last edited by a moderator: