Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi R,
The other problem with the starting sheet being selected as part of the print range is still present however. Best if I couild get rid of it - but its something I can live with I suppose. To obviate this problem, try: '=========================== Sub PrintMacro() Dim PrintRange As Range Dim rCell As Range Dim Confirm As Variant Dim blFlag As Boolean blFlag = True Set PrintRange = Range("SheetsToPrint") Confirm = InputBox("Are you sure? (enter 'y' to continue)") If UCase(Confirm) < "Y" Then GoTo TheEnd For Each rCell In PrintRange.Cells If Not IsNumeric(rCell) Then Sheets(rCell.Value).Select Replace:=blFlag blFlag = False End If Next rCell ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets(1).Select TheEnd: End Sub '<<=========================== --- Regards, Norman "rwong" wrote in message ... Hi Norman, I did indeed make the change as suggested. Was getting a subscript range error because my cells weren't really empty (ie my sheettoprint range was fill with isblank formula.) - my solution was to change the isempty function to a isnumeric function (since I could get it to return zero). The other problem with the starting sheet being selected as part of the print range is still present however. Best if I couild get rid of it - but its something I can live with I suppose. Thanks alot! -- rwong ------------------------------------------------------------------------ rwong's Profile: http://www.excelforum.com/member.php...o&userid=12735 View this thread: http://www.excelforum.com/showthread...hreadid=390812 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing Multiple Sheets | Excel Discussion (Misc queries) | |||
Select sheets from an array for printing | Excel Discussion (Misc queries) | |||
Printing Multiple sheets on ONE? | Excel Discussion (Misc queries) | |||
Printing multiple sheets. | Excel Programming | |||
Sheets(array) method for printing grouped worksheets | Excel Programming |