![]() |
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 |
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 |
All times are GMT +1. The time now is 02:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com