Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying Selective Data Between Worksheets | New Users to Excel | |||
Selective Macro Security in Excel 2007 | Excel Discussion (Misc queries) | |||
Selective printing of worksheet | New Users to Excel | |||
Selective linking items between two worksheets | Excel Worksheet Functions | |||
Selective linking items between two worksheets | Excel Programming |