View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Jackson Jim Jackson is offline
external usenet poster
 
Posts: 324
Default allow user to stop macro with yes no question

If InputBox(......) = "No" then
Exit Sub
End If

--
Best wishes,

Jim


"VMcD" wrote:

I would like to "lock" a page using a macro/button that says "Submit and
Lock", but I would like to give to display a message first that says "You
will not be able to make any more changes to this page. Are you sure you
want to proceed?" Then I would like for the user to be able to pick "Yes" or
"No" and suspend the macro if the user says "No."

How would I do this using code in an Excel macro?

Thanks in advance for your help!