2 Replies Latest reply on Jul 11, 2013 12:52 AM by david.hughes3

    Getting the answer from a dialog box

    david.hughes3

      Hi,

       

      I have a dialog box with the OK and Cancel buttons, but I cannot workout how to get the answer from the dialog box telling me which button was pressed. This is what I've got...

       

      Dim result

      result = MsgBox "test",1


      if result = 1 Then
            MsgBox "you chose OK"
      End if

       

      if result = 2 Then
           MsgBox "you chose Cancel"
      End if

       

      DxDesigner errors when the code gets to the "result = MsgBox "test",1" statement with the following:

      untitled.bmp

      If anyone can help that would be fantastic.


      Dave