Print Macro in excel

Print Macro in excel

Author
Discussion

bluesatin

Original Poster:

3,114 posts

274 months

Monday 16th April 2007
quotequote all
Help.

I have a large excel spreadsheet which tracks key metrics and comments by country to budget. The front page is a dashboard with various drop downs (versus YTD budget, versus 06 and more importantly country).

any tips on a macro that can print the same sheet for each country with just one button?

thanks

tigger1

8,402 posts

223 months

Monday 16th April 2007
quotequote all
If you're a noggin' - record macro, then select each of the tabs you want, hit print "selection", or active sheets..whatever works (don't have excel open to look!) - and then end recording. Edit macro as needed from there, and you're done.

Does that help?

bluesatin

Original Poster:

3,114 posts

274 months

Monday 16th April 2007
quotequote all
Thanks but that did not work. Somehow the recorded Macro did not recognise the selected drop down and so printed the same page 28 times!

PaulV

302 posts

228 months

Monday 16th April 2007
quotequote all
Try this:-

Sub PrintIt()
Dim sht As Worksheet
For Each sht In Application.ActiveWorkbook.Worksheets
If sht.Name <> "Sheet1" Then
sht.PrintOut , , 1
End If
Next
End Sub

Replace "Sheet1" with the name of your menu page.

HTH