Results 1 to 9 of 9

Thread: vb Yes or no

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    143

    vb Yes or no

    How do i set value to thse so that not matter which one is clikc, they end the program?

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    a = msgbox("are you sure you want to end the program?",vbyesno)
    'no checking for it
    unload me
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    143
    But see herer is wher ei'm tyring to intergrate:

    Code:
    If feild.Quanity < quanty Then MsgBox " Hey now, check that quantity", vbOKOnly
                        
                        
                    End If

    Only if that circumstace is true, should it end.. and now i switched it to vb ok only.

  4. #4
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    change it to:

    If feild.Quanity < quanty Then MsgBox " Hey now, check that quantity", vbOKOnly : Unload Me
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    143
    thanks buddy.

  6. #6
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    btw you spelled 'feild' wrong. it is spelled 'field'.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  7. #7
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349
    you could do this
    VB Code:
    1. a= MsgBox("Exit?",vbYesNo)
    2. If a = vbYes or vbNo Then
    3.   Unload Me
    4.   End
    5. End If
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

  8. #8
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    hey blinky think about what you just said.

    If a = vbYes or vbNo Then
    Unload Me
    End
    End If

    when there are only 2 options, yes or no. why dont just remove that and use

    Unload me
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  9. #9
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349
    If you read the original question:

    How do i set value to thse so that not matter which one is clikc, they end the program?
    He wants to have something that operates on clicking Yes Or No so i incorporated that into my response so that he can see how to do it that way. I would do it your way, and in fact do regularly when i do this sort of thing, but the question was put and while just ignoring the response options for this specific case works fine, it doesn't show him how to do one action on multiple click options in the future. So i wrote my code to show how to do that.

    Hope i have explained myself.

    Good coding.
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width