print button macro & specific tabs to print

C

Chuck

hi guys,

first, sorry for the multiple posts (but thought this group would be
more relevant for my needs)

query:

is there a way i can put a button within the first sheet of my
workbook that says.. print workbook

when doing so, it will print the following tabs (as i have more then
the specific tabs mentioned below)

notes
actual
spend calendar
purchase record

and within this function, look at tabs 001-013 and identify if there
is any value in $J$38 > 0 in each tab, if so, print the tabs that have
a value > 0

cheers
chuck
 
C

Chuck

hi guys,

i figured it out

Sub PrintWorkbook()

Sheets("Notes").PrintOut
Sheets("Actual").PrintOut
Sheets("Spend Calendar").PrintOut
Sheets("Purchase Record").PrintOut

If Sheets("001").Range("J38") > 0 Then
Sheets("001").Range("a1:K56").PrintOut
If Sheets("002").Range("J38") > 0 Then
Sheets("002").Range("a1:K56").PrintOut
If Sheets("003").Range("J38") > 0 Then
Sheets("003").Range("a1:K56").PrintOut
If Sheets("004").Range("J38") > 0 Then
Sheets("004").Range("a1:K56").PrintOut
If Sheets("005").Range("J38") > 0 Then
Sheets("005").Range("a1:K56").PrintOut
If Sheets("006").Range("J38") > 0 Then
Sheets("006").Range("a1:K56").PrintOut
If Sheets("007").Range("J38") > 0 Then
Sheets("007").Range("a1:K56").PrintOut
If Sheets("008").Range("J38") > 0 Then
Sheets("008").Range("a1:K56").PrintOut
If Sheets("009").Range("J38") > 0 Then
Sheets("009").Range("a1:K56").PrintOut
If Sheets("010").Range("J38") > 0 Then
Sheets("010").Range("a1:K56").PrintOut
If Sheets("011").Range("J38") > 0 Then
Sheets("011").Range("a1:K56").PrintOut
If Sheets("012").Range("J38") > 0 Then
Sheets("012").Range("a1:K56").PrintOut
If Sheets("013").Range("J38") > 0 Then
Sheets("013").Range("a1:K56").PrintOut

End Sub

cheers
chuck
 
D

Dave Peterson

Check your other thread.
hi guys,

first, sorry for the multiple posts (but thought this group would be
more relevant for my needs)

query:

is there a way i can put a button within the first sheet of my
workbook that says.. print workbook

when doing so, it will print the following tabs (as i have more then
the specific tabs mentioned below)

notes
actual
spend calendar
purchase record

and within this function, look at tabs 001-013 and identify if there
is any value in $J$38 > 0 in each tab, if so, print the tabs that have
a value > 0

cheers
chuck
 

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