This "If System.Windows.Forms.DialogResult.OK Then" tells me that you do not have Option Strict On, not to mention there is not a comparison. It will always evaluate to true, regardless of which button you click.
It should look something like this:
Code:Dim dRslt As DialogResult dRslt = MessageBox.Show("OK or Cancel", "Test", MessageBoxButtons.OKCancel) If dRslt = Windows.Forms.DialogResult.OK Then 'ok Else 'cancel End If




Reply With Quote