AnsweredAssumed Answered

Getting the answer from a dialog box

Question asked by david.hughes3 on Jul 10, 2013
Latest reply on Jul 11, 2013 by david.hughes3



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:


If anyone can help that would be fantastic.