How do I pause a macro to wait for a user's response (Yes/No type response) before the macro continues?
How do I pause a macro to wait for a user's response (Yes/No type response) before the macro continues?
Good evening Brisbane Rob
The code below shows how to get a MsgBox to await a yes/no input from a user. Technically, you only need line 2, the lines after that just demonstrate how to capture the user response.
Sub Test()
Response = MsgBox("The macro has now stopped. Select Yes or No", vbYesNo)
If Response = vbYes Then
MsgBox "Selected : Yes"
Exit Sub
End If
MsgBox "Selected : No"
End Sub
HTH
DominicB
Thanks a lot - very much appreciated
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks