LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Some help with Printing code

Just a potential typo problem:

v= Array("A1:D20,E1:H20, . . . 30 ranges")
should be:
v= Array("A1:D20","E1:H20", . . . "30 ranges")




Tom Ogilvy wrote:

Here is some pseudo code that might do what you want:

Dim v as Variant, n as Long, i as Long
Dim rng as Range
v= Array("A1:D20,E1:H20, . . . 30 ranges")
n = 0
for i = lbound(v) to ubound(v)

set rng = Range(v(i))
if application.Sum(rng) = 0 then _
exit for
n = n + 1
Next i
Worsheets("Master").Printout from:=1, to:=n

Adjust the array to refer to the appropriate 30 ranges that each would sum
up to greater than 0 if you wanted to print up to that page

--
Regards,
Tom Ogilvy

"Dean" wrote in message
ups.com...
Gary,

The code above highlighted both tabs my data page and master page but
progressed no further.

The code only needs to print off my master page.

Appreciate your assistance.


--

Dave Peterson


 
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 code Jase Excel Discussion (Misc queries) 2 September 15th 08 07:49 PM
printing vba code in color Art Excel Programming 0 June 24th 05 12:56 PM
code for printing Duncan_J Excel Programming 1 October 5th 04 10:21 PM
Printing code mn[_2_] Excel Programming 1 January 21st 04 12:35 AM
Improved printing of VBA code? steve Excel Programming 0 August 29th 03 08:42 PM


All times are GMT +1. The time now is 04:05 PM.

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"