Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro

Status
Not open for further replies.

bsl19738

IS-IT--Management
May 18, 2008
13
US
I'm trying to take a excel spreadsheet and be able to hit one button and automatically print out certain pages in the excel file but not all. Do they have a macro that can do this with a click of a button? Any help would be appreciated.
 
Will it always be the same sheets you want to print?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Then something like:
Code:
Sub PrintSheets()
ActiveWorkbook.Worksheets("SheetToPrintNameOrIndex").PrintOut
ActiveWorkbook.Worksheets("SheetToPrintNameOrIndex2").PrintOut
End Sub
Just add a line for each sheet you want to print.

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
bsl19738 :

Out of curiosity, did you try using the Macro Recorder as was suggested by two people in thread68-1477881 over in the Microsoft: Office forum?


[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top