Hoping a VBA master can help with this...

  • Thread starter cabana_boy via OfficeKB.com
  • Start date
C

cabana_boy via OfficeKB.com

Hoping someone can help me with this. I have a rather large workbook (23
worksheets) that I'm using as a sort of database (because my employer thinks
Access is of the devil for some reason). I need to exclude the following
sheets from printing when I do a workbook print:

Foreign WD
On Us-Denials-Inquiries
Total Transactions
Availability
Surcharge
Interchange
Expenses
Profitability

Is there a way to do this?
 
G

Gary''s Student

Check this out:

Sub printsome()
Dim s As String
s = "Foreign WDOn Us-Denials-InquiriesTotal
TransactionsAvailabilitySurchargeInterchangeExpensesProfitability"
Dim ws As Worksheet
For Each ws In Worksheets
If InStr(s, ws.Name) > 0 Then
Else
ws.PrintOut
End If
Next
End Sub

Just watch the wrapping. The s= is one long line!
 

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