I need a macro that will print all tabs where cell D2 has any data in it.....any help would be appreciated. I need to make sure the macro does not include the tab's names since they will change quiet often and people come and go.
Thanks!
Code:Option Explicit Sub Print_Sheets() Dim ws As Worksheet On Error Resume Next For Each ws In ThisWorkbook.Worksheets If Range("D2") <> "" Then ws.PrintOut Next ws End Sub
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Edit:Code:Sub aaa() For Each ws In ThisWorkbook.Worksheets If ws.Range("D2").Value <> "" Then ws.PrintOut Copies:=1, Collate:=True End If Next ws End Sub
Must learn to use refresh button![]()
Regards
Rick
Win7, Office 2010
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks