View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default vbOK and check for variable

Sub YourMacro ()
Dim response
If LCase(Range("A1")) = "yes" Then
response = MsgBox("Do you want to continue?", 1, "Verify Run Update")
End If
If response = vbCancel Then
Exit Sub
Else
End If
'...Rest of your macro
End Sub

Mike F
"Matt" wrote in message
...
I have a button that exectutes a procedure when clicked....I would like to
insert something that checks the value of cell A1. If the value is Yes, I
want a box to appear asking the user if it is okay to continue. If they
choose OK, the rest of the procedure is finished, if the choose Cancel,
the
procedure is terminated. If the value in A1 is anything but Yes, the
procedure is run without any question asked.