Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you,
This works. I did have to re-arrange the subs, but this works great. "Gary Keramidas" wrote: looks like it already exits, but maybe this will help Sub Check() Dim Msg, Style, Title, Response Msg = "This JV does not balance, please correct it before you continue." Style = vbOKCancel Title = "Out of Balance" Response = MsgBox(Msg, Style, Title) If Response = 1 Then ' ok pressed Exit Sub Else 'response = 2 ' do something else End If End Sub -- Gary "Y2D3Y4" wrote in message ... In Excel 2003 I have a macro that checks if a cell is not zero. Range ("P124").Select If Selection.Value < 0 Then Call Check End If Sub Check() Dim Msg, Style, Title, Response Msg = "This JV does not balance, please correct it before you continue." Style = vbOKCancel Title = "Out of Balance Response = MsgBox (Msg, Style, Title) End Sub I want to exit out of the macro routines when the user presses OK. Thanks Andy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run macro on exit | Excel Discussion (Misc queries) | |||
UserForm_Initialize, how to exit sub based on condition? | Excel Programming | |||
Exit via macro only? | Excel Discussion (Misc queries) | |||
on exit macro | Excel Discussion (Misc queries) | |||
Exit a macro from an error condition | Excel Programming |