View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default MsgBox working is Excel Macro Programming

Sub Macro()
If MsgBox("Do you want to continue?", vbOKCancel) < vbYes Then Exit Sub
'your code continues

End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Vikas Vadgama" wrote:

I want a MsgBox when the macro starts with 2 buttons. If user presses OK
button, macro continues. If user presses Cancel button, macro ends. Can
someone please advise how to do the same.
--
Vikas Vadgama
Though worth Millions: Humanity is the biggest & the best religion. Live &
Let Live.