I have code that pops up a dialog box and waits for either the OK or Cancel button to be clicked. I am trying to figure out how to get and use the repsonse from dialog box. If the user clicks OK, I want the rest of the code to execute normally (it already does this by default). If the user clicks Cancel, I want to skip the rest of the code. I was assuming OK would return TRUE and Cancel would return FALSE, but that apparently is not correct. How do I figure out whether OK or Cancel was clicked?

Code:
        If Not MapCheck() = "" Then
            DiaError.TextBoxErr.Text = MapCheck()
            If Not DiaError.ShowDialog() Then  'show dialog box and evaluate output
                GoTo breakme 'if Cancel is clicked
            End If
        End If

        ' Rest of code