View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
JP[_4_] JP[_4_] is offline
external usenet poster
 
Posts: 897
Default How do I create a warning message on a command button

The code is

MsgBox "Warning! Are You Sure", vbYesNoCancel

But you'll want it to be part of a conditional statement, for example

If MsgBox("Warning! Are You Sure", vbYesNoCancel) = vbYes Then
Exit Sub
End If


HTH

On Jan 23, 4:13*am, lkreeder
wrote:
I am a newbie to anything above basic level in Excel. *I know how to create
and use Command Buttons, but I need to create a "Warning! Are You Sure"
message when you click the button, with "Yes", "No", and "Cancel" options..