I have one simple worksheet in a workbook. It consists of three print ranges.
++++++
Now I have a custom print button:
It's set to print my entire range, and works like a champ! ...but I'd like to set it up to print when certain conditions are met.
I'd like to say ::
if E39>0 and E77<=0 and E118<=0 ...then set print range: A1:E39
if E39>0 [AND] E77>0 [AND] E118<=0 ... then set print range: A1:E79
if E39>0 [AND] E77>0 [AND] E118>0 ... then print a specific range: A1:E120
++++++
I'm getting lost on the print via specific conditions...
Anyone have an idea how this might be best handled?
++++++
Now I have a custom print button:
Code:
Sub Button27_Click()
Application.ScreenUpdating = False
Sheets("sheet1").Visible = True
Sheets("sheet1").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$E$120"
ActiveWindow.SelectedSheets.PrintOut copies:=1, collate:=True
Sheets("sheet1").Visible = True
Application.ScreenUpdating = True
End Sub
It's set to print my entire range, and works like a champ! ...but I'd like to set it up to print when certain conditions are met.
I'd like to say ::
if E39>0 and E77<=0 and E118<=0 ...then set print range: A1:E39
if E39>0 [AND] E77>0 [AND] E118<=0 ... then set print range: A1:E79
if E39>0 [AND] E77>0 [AND] E118>0 ... then print a specific range: A1:E120
++++++
I'm getting lost on the print via specific conditions...
Anyone have an idea how this might be best handled?