Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JulieD
 
Posts: n/a
Default

Hi

you can't use a formula for this, but you can use a macro to cycle through
all the worksheets testing the value of a cell and then printing that sheet,
e.g.

Sub cyclethroughws()
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Range("A1").Value 0 Then 'change the cell reference as
needed.
ws.PrintOut
MsgBox "printed " & ws.Name
End If
Next ws
End Sub

---

to use this code, right mouse click on a sheet tab and choose view code
from the menu choose insert / module
copy & paste the code onto the right hand side of the screen
if any lines go red, click and the end of the line and press the delete
key - this should fix line wrap problems
then use ALT & F11 to switch back to your workbook
choose tools / macro / macros - look for the one that says
"cyclethroughws" and press the RUN button

Hope this helps
Cheers
JulieD

"CC" wrote in message
...
Hope someone can help.
I have a workbook with quite a few sheets. Is it possible to write an if
formula where, if a certain cell on the sheet 0, the whole sheet should
be
printed?
Can I then write a macro where it tests all the sheets in the workbook?



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 - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
Relative Indirect Formula Referencing? Damian Excel Worksheet Functions 1 January 7th 05 04:16 AM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


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