Thread: VbYesNo Msg Box
View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

option explicit
sub testme01()
dim Resp as long
resp = msgbox(Prompt:="Continue?",buttons:=vbyesno)
if resp = vbno then
'msgbox "Quitter!"
exit sub
end if

'rest of code here
end sub



mjack003 wrote:

Howdy,

I've connected a macro to a command button but before executing I need
a Yes/No msgbox to appear. How would I go about creating a msgbox that
if "yes" execute, if "no" End sub? Any help is appreciated.

Best Regard,
Mjack

--
mjack003
------------------------------------------------------------------------
mjack003's Profile: http://www.excelforum.com/member.php...fo&userid=5141
View this thread: http://www.excelforum.com/showthread...hreadid=469749


--

Dave Peterson