View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Conditional Hide/Print Worksheet

Here is the first part to print by condition

Sub PrintCondition()
Dim w As Worksheet
For Each w In Worksheets
If Range("A9").Value 10 And _
Range("A9").Value < 20 Then w.PrintOut
Next
End Sub

It would be best to put this in a general module and call it from the
button_click event.

Mike F
"davyb" wrote in
message ...

Can anyone tell me how I can create a button on one worksheet that will
print that and other worksheets in the file that have a specified value
range in a specified field on each worksheet?

Similarly I need to show or hide worksheets dependent on teh value in a
specified field in another worksheet. This should not be activated by a
button but by the value in the specified field being entered so that eg
a worksheet that is hidden by default will be revealed should the value
in the specified field of another worksheet be a specified amount.

Thanks!!!


--
davyb
------------------------------------------------------------------------
davyb's Profile:
http://www.excelforum.com/member.php...o&userid=26401
View this thread: http://www.excelforum.com/showthread...hreadid=396776