cancel in msgbox not working...

  • Thread starter Thread starter magmo
  • Start date Start date
M

magmo

Hi


I have a button that triggers a sub routine, but I wanted to have a
confirmation dialog before the subroutine actually is called. So I
added a msgbox with a OKCancel property to it. But that didn't work
the subroutine is called upon even if I click cancel.

Why is that?


Regards

Magnus
 
Hi Magmo,

Show us that line of code?

The answer is easy however with the code it is better to show.

Cor
 
* (e-mail address removed)-spam.invalid (magmo) scripsit:
I have a button that triggers a sub routine, but I wanted to have a
confirmation dialog before the subroutine actually is called. So I
added a msgbox with a OKCancel property to it. But that didn't work
the subroutine is called upon even if I click cancel.

\\\
If MsgBox("Really perform operation?", MsgBoxStyle.OKCancel) = MsgBoxResult.OK Then
DoSomething()
End If
///
 
Back
Top