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

I would use a "yes no" msgbox to do this.
If MsgBox("You will not be able to make any more changes to this page."
_
& "Are you sure you want to proceed?", vbYesNo, "Locking
Workbook...") _
= vbYes Then
MsgBox "User clicked yes"
Else
MsgBox "User clicked no"
End If

Charles
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!