Selective Printing of Excel Worksheets using Macro
Try this:-
Sub selectiveprint()
Dim wSheet As Worksheet
For Each wSheet In Worksheets
wSheet.Select
If Cells(1, 1).Value = "Print Me" Then
wSheet.PrintOut
End If
Next wSheet
End Sub
Mike
"Daniel Clough" wrote:
I need a VBS script for an Excel Macro to print a worksheet but only if one
of the fields on the sheet has been filled. At the moment my Macro prints
every worksheet that might be needed and I'm wasting a ton of paper and ink
every time.
Any help :)
Dan
|