Yes/No Action does not halt Macro

molsen

Registered User.
Local time
Today, 07:46
Joined
Sep 13, 2012
Messages
50
Hi All

I have inserted a function via a module at the beginning of a Macro using the RunCode action:

Function Msgbox_Yes_No()
Dim Response As Integer
Response = MsgBox(prompt:="Select 'Yes' or 'No'.", Buttons:=vbYesNo)
If Response <> vbYes Then

End If
End Function

However, it doesnt stop the macro from continuing on its way to delete a load of records if the user chooses no. Any ideas?

Many thanks
 
Thanks for the response.

A single macro runs a sequence of queries, each of which deletes records from many underlying tables. When the user clicks on a button, I want a Y/N box to appear, in case they clicked on the button but didnt mean to. If they say Yes, the macro carries on and executes, or if no, the macro is halted.
 

Users who are viewing this thread

Back
Top Bottom