Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yes No MsgBox 1

Status
Not open for further replies.

jt643

Technical User
Jun 17, 2003
144
Is there any way to code logic to respond to whether the user clicks 'yes' or 'no' on a yes/no MsgBox?

I want the box to disappear and nothing further run in the code if the user clicks 'no'. If they click 'yes', then the code will continue to run.

Thanks.
 
Something like this:

[tt]if msgbox("Wanna continue?",vbyesno+vbquestion)=vbno then
exit sub
end if[/tt]

or

[tt]if msgbox("Wanna continue?",vbyesno+vbquestion)=vbyes then
' perform some code
end if[/tt]

Roy-Vidar
 
Incredible! Thanks Roy-Vidar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top