Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
halting macro
Hi again,
lots of questions from here and thanks for all the good answers! Really helped. Another question is how to make a dialogbox where you answer a question (yes or no answer) were a positive answer would continue to run the reminding macro while a negative answer would halt the macro right there. Is there such an code to resolve this as well? Kind regards Jonas *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
halting macro
Hi !
put this into a new module : it works ! Option Explicit Public titre$, defaut$, question$, reponse$ Sub continue_yes_or_no() 'here we start something titre$ = "Info..." question$ = "here we are..." MsgBox question$ 'now comes the question titre$ = "Info..." question$ = "Shall we continue" & vbCrLf & "--------- <Yes or <No ?" defaut$ = "" reponse$ = InputBox(question$, titre$, defaut$) If Left(UCase(reponse$), 1) = "N" Then MsgBox "The answer is no: we stop" Exit Sub End If MsgBox "The answer is Yes" MsgBox "So we continue..." 'and here you go with your code.... '... End Sub regards+ Hervé+++ -----Original Message----- Hi again, lots of questions from here and thanks for all the good answers! Really helped. Another question is how to make a dialogbox where you answer a question (yes or no answer) were a positive answer would continue to run the reminding macro while a negative answer would halt the macro right there. Is there such an code to resolve this as well? Kind regards Jonas *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
halting macro | Excel Programming |