Can I put button on spreadsheet to make it print a specific part?

C

CindyMc

I have created a spreadsheet with several pages on it. I would like to be
able to have a button at each page that can be pushed to print that
particular page. I am fairly familiar with excel but not with macros. Can I
do this with a macro?
 
J

JCS

Hi Cindy,

Yes you can do what your are asking.
Open up the Macro Editor (Alt-F11)
Select Insert and then Module

Paste in the following code:
Sub Page1()
'
Range("A23").Select
Selection.CurrentRegion.Select
Selection.PrintOut Copies:=1
Range("A23").Select
End Sub

Sub Page2()
'
Range("A45").Select
Selection.CurrentRegion.Select
Selection.PrintOut Copies:=1
Range("A45").Select
End Sub

and so forth... Change the cell names in the Range command to the upper
left corner of your range for each page. Then create a macro button located
on the Forms toolbar (Excel 2003) and assign each macro to the appropriate
button.

If this helps, please press YES.

JCS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top