roofem
02-11-2005, 04:47 PM
Good day,
I am trying to get an if then statement regarding printing or not printing a page in a spreadsheet to work and I am stuck. Here is the scenario - I have two ranges "Yellow" and "Blue". I want to print both the Yellow and Blue ranges if a particular cell = "yes" and otherwise just print the Yellow range. Here is the coding I am currently trying to use: I created print macros (that do work) called printcombinedsections (to print yellow and blue) and printyellow section (to just print yellow)
Sub worksheet_Calculate()
If Range("c25") = "Yes" Then
printcombinedsections
Else: PrintYellowSection
End If
End Sub
Any idea would be much appreciated.
Roofem
I am trying to get an if then statement regarding printing or not printing a page in a spreadsheet to work and I am stuck. Here is the scenario - I have two ranges "Yellow" and "Blue". I want to print both the Yellow and Blue ranges if a particular cell = "yes" and otherwise just print the Yellow range. Here is the coding I am currently trying to use: I created print macros (that do work) called printcombinedsections (to print yellow and blue) and printyellow section (to just print yellow)
Sub worksheet_Calculate()
If Range("c25") = "Yes" Then
printcombinedsections
Else: PrintYellowSection
End If
End Sub
Any idea would be much appreciated.
Roofem