Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Printing multiple sheets in an array


Actually - I deleted the pseudo blank cells to test it out further - an
apparently, right before the print command is issued, the sheets ge
unselected, and only the current highlighted cell gets printed...

Further help would be much appreciated

--
rwon
-----------------------------------------------------------------------
rwong's Profile: http://www.excelforum.com/member.php...fo&userid=1273
View this thread: http://www.excelforum.com/showthread.php?threadid=39081

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Printing multiple sheets in an array

Hi R,

Did you change:

Selection.PrintOut Copies:=1, Collate:=True


to:

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

as suggested in my follow up post?

With the former, the sheets will be deselected; with the latter, the sheet
selection should be retained.

Indeed, you might care to add a final line:

Sheets(1).Select

to break the multisheet selection, after printing.

---
Regards,
Norman



"rwong" wrote in
message ...

Actually - I deleted the pseudo blank cells to test it out further - and
apparently, right before the print command is issued, the sheets get
unselected, and only the current highlighted cell gets printed...

Further help would be much appreciated.


--
rwong
------------------------------------------------------------------------
rwong's Profile:
http://www.excelforum.com/member.php...o&userid=12735
View this thread: http://www.excelforum.com/showthread...hreadid=390812



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Printing multiple sheets in an array


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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Printing multiple sheets in an array

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



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
Printing Multiple Sheets Chad Excel Discussion (Misc queries) 3 October 17th 07 10:23 PM
Select sheets from an array for printing bennyob Excel Discussion (Misc queries) 2 November 24th 05 01:03 PM
Printing Multiple sheets on ONE? onesidered Excel Discussion (Misc queries) 2 August 10th 05 06:58 PM
Printing multiple sheets. sungen99[_3_] Excel Programming 2 May 6th 04 08:41 PM
Sheets(array) method for printing grouped worksheets Tom Ogilvy Excel Programming 0 July 17th 03 09:11 PM


All times are GMT +1. The time now is 08:26 PM.

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

About Us

"It's about Microsoft Excel"