Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Conditional Worksheet Printing...

Hey all, I'm kinda new here but I was wondering if anyone has any tips
to get me started on this...

I have a workbook with 39 worksheets, all structured the same where I'd
enter a list with costs and a total formula at the bottom of each,
entered and printed every week. If the total at the bottom of the
sheets (all in F24 to make thigs that much easier for me) is zero,
meaning there are no entries on that sheet for the week, I simply don't
print that sheet.

Obviously, I want to create a module that I can apply to a button that
will automatically look at all 39 sheets and select, group together,
the ones where the total does not equal zero. Basically, the sheets
that have entries on them, group them and print them. (Keeping in mind
the totals could be negarive values as well.)

I haven't got anything yet as I mentioned I'm quite new with learning
all of this but would love a place to start and get better from.

Thanx all in advance for your help...

Scott

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Conditional Worksheet Printing...

Scott,

No need to group:

Dim mySh As Worksheet

For Each mySh In ActiveWorkbook.Worksheets
If mySh.Range("F24").Value < 0 Then mySh.Printout
Next mySh

HTH,
Bernie
MS Excel MVP


"ScooterJB" wrote in message
ups.com...
Hey all, I'm kinda new here but I was wondering if anyone has any tips
to get me started on this...

I have a workbook with 39 worksheets, all structured the same where I'd
enter a list with costs and a total formula at the bottom of each,
entered and printed every week. If the total at the bottom of the
sheets (all in F24 to make thigs that much easier for me) is zero,
meaning there are no entries on that sheet for the week, I simply don't
print that sheet.

Obviously, I want to create a module that I can apply to a button that
will automatically look at all 39 sheets and select, group together,
the ones where the total does not equal zero. Basically, the sheets
that have entries on them, group them and print them. (Keeping in mind
the totals could be negarive values as well.)

I haven't got anything yet as I mentioned I'm quite new with learning
all of this but would love a place to start and get better from.

Thanx all in advance for your help...

Scott



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Conditional Worksheet Printing...

Actually, I would like to group because I want to create a a module
that will collate printed pages and print them multiple times based on
an input...

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Conditional Worksheet Printing...

Scooter,

Sub TryNow()
Dim mySh As Worksheet
Dim bSel As Boolean

bSel = True

For Each mySh In ActiveWorkbook.Worksheets
If mySh.Range("F24").Value < 0 Then
If bSel Then
mySh.Select
bSel = False
Else
mySh.Select False
End If
End If
Next mySh

End Sub


HTH,
Bernie
MS Excel MVP


"ScooterJB" wrote in message
oups.com...
Actually, I would like to group because I want to create a a module
that will collate printed pages and print them multiple times based on
an input...



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
Conditional Printing James[_4_] Excel Discussion (Misc queries) 1 July 24th 07 10:45 PM
Conditional Printing chris100[_56_] Excel Programming 3 February 11th 06 01:04 PM
Conditional Printing of worksheet Thor[_6_] Excel Programming 1 January 12th 06 02:47 AM
Conditional Printing Josh Whitney Excel Programming 5 June 12th 04 12:26 AM
conditional printing skitek Excel Programming 1 June 9th 04 03:04 PM


All times are GMT +1. The time now is 03:19 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"