ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hoping a VBA master can help with this... (https://www.excelbanter.com/excel-programming/436976-hoping-vba-master-can-help.html)

cabana_boy via OfficeKB.com

Hoping a VBA master can help with this...
 
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?

--
Message posted via http://www.officekb.com


Gary''s Student

Hoping a VBA master can help with this...
 
Check this out:

Sub printsome()
Dim s As String
s = "Foreign WDOn Us-Denials-InquiriesTotal
TransactionsAvailabilitySurchargeInterchangeExpens esProfitability"
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!

--
Gary''s Student - gsnu200909


"cabana_boy via OfficeKB.com" wrote:

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?

--
Message posted via http://www.officekb.com

.



All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com