Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default prevent print

Hi,

Try it this way

Dim WS As Worksheet
S = "ResultDetail,ControlDetail,ResultDetail"
V = Split(S, ",")
For Each WS In ThisWorkbook.Worksheets
If IsError(Application.Match(CStr(WS.name), V, 0)) Then
WS.PrintOut
End If
Next

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"joemeshuggah" wrote:

i am using the following piece of code to prevent the printing of a few
specified tabs in a workbook, however, it does not appear to be working
correctly. where am i going wrong? using excel 2003

For Each Sheet In ThisWorkbook
If Sheet.Name < "TestData" And Sheet.Name < "ResultDetail" And
Sheet.Name < "ControlDetail" Then
Sheet.PrintOut
End If
Next

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent Printing in Print Preview? JRK Excel Programming 4 February 4th 09 04:30 PM
Prevent print setup changes Kelly P[_2_] Excel Programming 1 February 27th 08 10:17 PM
In Excel 2003 is there a way to prevent "Save As" and "Print"? lucky2000 Excel Discussion (Misc queries) 3 April 26th 07 02:49 PM
HOW CAN I PREVENT EXCEL FILES FROM BEING DELETED OR PREVENT TRASH ROB Excel Discussion (Misc queries) 2 April 2nd 07 01:13 PM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"