Hi guys, I feel like I'm so nearly there but I just can't seem to get the code to work ^^
I have about 30 sheets. The first sheet contains all of our offices' contact details and invoice information for the current month (invoice id, amount owed etc). The other 29 or so sheets pull all of their information from the cover sheet. We don't always get invoices from every office every month so I want to be able to click a button that will check cell "B25" on each sheet (excluding the first sheet if possible). Cell B25 on my sheets is the cell that shows the total value of the invoice for that month. B25 is currently set as a currency cell and it's formula is simply "sum(B4:B23)".
What I would like to happen is that the 29 'other' sheets get checked for any value in B25 (i.e. any amount owed this month). If there is an amount there then I would like the sheet to print. I would like every sheet to be checked and printed from the click of one button.
Here's what I have at the moment:
Sub PrintSheets()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Sheets
With sh
If .Range("B25").Value >= 0.01 Then ActiveSheet.PrintOut
End With
Next sh
End Sub
Thanks for any help in advance!
----------------------------------------------------------------------------------
P.S
I haven't started looking for any help with this section yet but again, any help would be great, sorry if I'm a simpleton.
I also want the button to then save the document to a specific file location at the end (once it has checked every sheet). How do I go about doing this?
Also, on the cover sheet I also have each office's contact email address. What I would REALLY REALLY REALLY like to happen () is for the same or a similar button to email a copy of the sheet (just the sheet, not the workbook) to the respective office. So again, if B25 has any value then the button should print the sheet and email a copy to the relevant email address, then once it has checked every sheet, I would like it to save to a specific location.
Thanks again :D:D
Bookmarks