Message box help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • codeman54
    New Member
    • Jan 2007
    • 18

    #1

    Message box help

    I have a message box that comes up when the form loads. i want the program to shut down if they click no. How is this done?
  • iburyak
    Recognized Expert Top Contributor
    • Nov 2006
    • 1016

    #2
    Try something like this:

    [PHP]
    Dim Ret As VbMsgBoxResult


    Ret = MsgBox("some message", vbYesNo)

    If Ret = vbNo Then End[/PHP]

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      If this is VB6, don't make the same mistake I did, and try to Unload the form from the Load event - it crashes VB. :(

      Comment

      Working...