Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I am working with a macro to print out all sheets in a workbook. I figure to group the sheets I want and then select which page to print. For example, I wish to print page 8 for every selected sheet.
My macro doesn't work. Did you know that already? Its pasted below, I get errors at the IF. Can anyone see the error and tell how to fix it? Thanks, Todd Sub PrintSelectedSheets() For Each sh In ActiveWindow.SelectedSheets sh.Activate x = InputBox("First Page to Print") y = InputBox("Last Page to Print") For Each ws In Worksheets If ws.Index = Worksheets(x).Index And ws.Index <= Worksheets(y).Index Then ws.PrintOut From:=, To:=, Copies:=1, Collate :=True End If Next Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add page numbers to selected sheets | Excel Worksheet Functions | |||
Print a selected number of sheets | Excel Discussion (Misc queries) | |||
Print preview and print only shows 2/3 of page selected | Excel Discussion (Misc queries) | |||
How to print a selected number of sheets? | Excel Worksheet Functions | |||
macro to select sheets/page in a workbook and print them | Excel Programming |