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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to trigger an event based on the response of a message box? 1

Status
Not open for further replies.

gabrielbatistuta

Technical User
Jun 21, 2007
20
0
0
US
I have created a combo box and when the user clicks for ie "People Development" a form will open.

I have done that. But I want to display a message box with Yes and No and when the user clicks on Yes the form will open automatically. How do I store the value of the response in VBA.

A sample code is greatly appreciated.

 
Ask the VBA help for MsgBox

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Code:
If MsgBox("Your message here.", "Title", vbYesNo) = vbYes Then
   Code to open form here.
End If


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top