Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skip / Execute Macro Q
I have a very simple piece of code that mails out various sheets, its
all captured in the routine below, how could I include a test within each sub routine to either:- (a) skip to next sub routine if value in SheetA B1 < 0 - this reference is specific to each sheet or (b) if answer to (a) is True execute sub routine and continue to next Sub Send() Application.ScreenUpdating = False Application.DisplayAlerts = False Call Mail_New_Version Call Mail_1 Call Mail_2 Call Mail_3 Call Mail_4 Call Mail_5 Sheets("Manual").Select Range("A1").Select End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skip / Execute Macro Q
Not seeing your project but how about ONE macro instead sub printif() for each c in sheets("sheetA").range("b1:b21") if c<0 then sheets(c).mail 'or whatever next c end sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Seanie" wrote in message ... I have a very simple piece of code that mails out various sheets, its all captured in the routine below, how could I include a test within each sub routine to either:- (a) skip to next sub routine if value in SheetA B1 < 0 - this reference is specific to each sheet or (b) if answer to (a) is True execute sub routine and continue to next Sub Send() Application.ScreenUpdating = False Application.DisplayAlerts = False Call Mail_New_Version Call Mail_1 Call Mail_2 Call Mail_3 Call Mail_4 Call Mail_5 Sheets("Manual").Select Range("A1").Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Skip a Macro | Excel Discussion (Misc queries) | |||
Macro: Code for skip a row | Excel Programming | |||
If cell is empty then run macro otherwise skip this macro | Excel Programming | |||
Sheets Skip Macro | Excel Discussion (Misc queries) | |||
How to skip in a macro | Excel Programming |