can anyone help me pleaase when i click yes and no it ends the program can anyone help.
Code:MsgBox("Do you really want to abour the scan", MsgBoxStyle.YesNo, "Abort")
If vbYes Then
Application.Exit()
Else
Timer1.Enabled = True
End If
Printable View
can anyone help me pleaase when i click yes and no it ends the program can anyone help.
Code:MsgBox("Do you really want to abour the scan", MsgBoxStyle.YesNo, "Abort")
If vbYes Then
Application.Exit()
Else
Timer1.Enabled = True
End If
You need to catch the result in a variable. Here is an example using MessageBox.Show:
Code:Dim result As DialogResult
result = MessageBox.Show("Do you really want to abour the scan", "Abort", MessageBoxButtons.YesNo)
If result = Windows.Forms.DialogResult.Yes Then
End If