Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The easiest error checking would be:
Private Sub PrintWIPButton_Click() Dim bReplace As Boolean Dim SheetNum As Integer bReplace = True For SheetNum = 1 To Worksheets.Count If Sheets(SheetNum).Name Like "WIP*" Then Sheets(SheetNum).Select bReplace bReplace = False End If Next SheetNum if not bReplace then ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End if Worksheets(1).Select End Sub bReplace will be false if at least one sheet has been selected in the loop (at least one sheet starts with WIP). -- Regards, Tom Ogilvy "Nick Shinkins" wrote in message ... Thanks for all your replies! I think I will use Tom's method combined with Ron's error checking in case there are no sheets with WIP (which is unlikely in the context). I guess it will be quicker not to flood the printer with individual requests for each page and avoiding arrays (which I thought would be the only possible way) is preferable. I'm never quite sure why you dedicate so much of your time to helping others but it is invaluable when the books and help files just don't seem to cover your problem. Thanks again guys! Nick Shinkins |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
How do I delete pages in Excel? Keeps printing blank pages at end. | Charts and Charting in Excel | |||
Printing Odd or Even Pages | Excel Discussion (Misc queries) | |||
Printing to various pages | Excel Discussion (Misc queries) |