How to set cancel option

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carl2k2
    New Member
    • Mar 2008
    • 15

    How to set cancel option

    Ok kind of new to this part,

    Here is my code I have set,

    [PHP]If (CHKcat1 = 1) Or (CHKcatb = 1) Or (CHKcatc = 1) Or (CHKcorp = 1) Or (CHKexe = 1) Then
    response = MsgBox("Are you sure you want to proceed?", vbOKCancel)
    Form4.Show
    Else
    response = MsgBox("Please Select your ticket")
    End If[/PHP]

    But how to set it up so that if they hit cancel it will close the box and return to the form., When I click cancel it goes to form4.show
  • !NoItAll
    Contributor
    • May 2006
    • 297

    #2
    You are not testing the value of response.

    If response = vbcancel then
    'do something you want when the user presses cancel
    Elseif response = vbok then
    form4.show
    End if

    Comment

    Working...