G
Guest
I have one sheet named Data and another sheet that contains two command
buttons. I want to press Command Button1 and have a print out of range
A1:G20 from the Data sheet. When I press Command Button2 I want a print out
of range A25:L35 from the Data sheet.
I recorded a macro from the sheet where my print buttons are to see the
code. It is as follows:
Sub Macro1()
Sheets("Data").Select
Range("A1:G20").Select
Selection.PrintOut Copies:=1, Collate:=True
Sheets("Print Buttons").Select
End Sub
I then created the command buttons and applied that code with the respective
ranges for each button, but it created an error.
When I press my print command buttons, I get a print out of a blank page,
not the data in the respective ranges. What am I doing wrong?
Thanks for any help.
buttons. I want to press Command Button1 and have a print out of range
A1:G20 from the Data sheet. When I press Command Button2 I want a print out
of range A25:L35 from the Data sheet.
I recorded a macro from the sheet where my print buttons are to see the
code. It is as follows:
Sub Macro1()
Sheets("Data").Select
Range("A1:G20").Select
Selection.PrintOut Copies:=1, Collate:=True
Sheets("Print Buttons").Select
End Sub
I then created the command buttons and applied that code with the respective
ranges for each button, but it created an error.
When I press my print command buttons, I get a print out of a blank page,
not the data in the respective ranges. What am I doing wrong?
Thanks for any help.