Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Branching Macro
I am trying to get a macro to “branch” based
upon the value in a given cell of the worksheet. Basically if the cell value is zero then the macro should stop and inform the user with a message box. So the error can be corrected. If the cell value is above zero then a longer much more complete macro should run.(Called Copy_Across which for simplicity I have paraphrased here) Any help appreciated. Paul Sub Check_Macro() ' 'Check to see closing stock has been entered If (L53 < 1) Then GoSub Stock_Entry If (L53 1) Then GoSub Copy_Across End Sub Sub Stock_Entry() MsgBox "No Closing Stock Entered Sunday" End Sub Sub Copy_Across() Application.Goto Reference:="Date_Sheet2" MsgBox "Ok This Time" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Branching Logic after SENDMAIL | Excel Worksheet Functions | |||
Branching Drop Down Menu | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |