Add print function

T

Tim

I would like to add a print button/link right on my worksheet that will print
some of my sheets but not all in the workbook. Any help would be appreciated.
 
O

Otto Moehrbach

That's easy enough to do but you will have to furnish the sheet names to
print or the sheet names not to print. You would also have to furnish the
range to print in each sheet or some logic that Excel can use to find the
range to print. HTH Otto
 
G

Gord Dibben

Might be just as easy to CTRL + Click on the sheet tabs to print and
File>Print>Active Sheets.

Or a short macro on a button.

Sub Print_Selected()
ActiveWindow.SelectedSheets.PrintOut
End Sub

If you will always be printing the same sheets go with this.

Sub print_some()
ActiveWorkbook.Worksheets(Array("Sheet1", _
"Sheet4", "Sheet5")).PrintOut
End Sub


Gord Dibben MS Excel MVP
 
T

Tim

Gord,

I will always print the same sheets. How do I add a button and then put the
macro on it?

Thanks!!
 
G

Gord Dibben

Button on a sheet?

View>Toolbars>Forms.

Select the button icon then draw a button on your sheet.

Right-click and "Assign Macro"

Button on a Toolbar?

View>Toolbars>Customize>Commands.

Scroll down to "Macros" and select.

Drag a Smiley face up to a Toolbar then right-click on it and assign the
macro to that.

You can change the Smiley to another Icon should you wish and change the
Tooltip name also.


Gord
 

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