title: Msgbox and vbyesnocancel
body: <p>Good day to all, i was having some trouble with my msgbox prompting with vbyesnocancel</p>
  
  <p>• This code everything is working just fine "BUT" i needed to click multiple yes, no, cancel to activate its function</p>
  
  <pre><code>Private Sub cbEnableDeductions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbEnableDeductions.Click
              If MsgBox("Do You want To Enable deductions?", vbYesNoCancel) = MsgBoxResult.Yes Then
                  cbEnableDeductions.Checked = True
                  txtSSS.Enabled = True
                  txtHDMF.Enabled = True
                  txtPhilHealth.Enabled = True
              ElseIf MsgBox("Do You want To Enable deductions?", vbYesNoCancel) = MsgBoxResult.No Then
                  cbEnableDeductions.Checked = True
                  Total()
              ElseIf MsgBox("Do You want To Enable deductions?", vbYesNoCancel) = MsgBoxResult.Cancel Then
                  cbEnableDeductions.CheckState = False
              End If
          End Sub
  </code></pre>
  
  <p>• with this code "NO" and "CANCEL" functions are not working</p>
  
  <pre><code> Private Sub cbEnableDeductions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbEnableDeductions.Click
          If MsgBox("Do You want To Enable deductions?", vbYesNoCancel) = MsgBoxResult.Yes Then
              cbEnableDeductions.Checked = True
              txtSSS.Enabled = True
              txtHDMF.Enabled = True
              txtPhilHealth.Enabled = True
          ElseIf vbYesNoCancel = MsgBoxResult.No Then
              cbEnableDeductions.Checked = True
              Total()
          ElseIf vbYesNoCancel = MsgBoxResult.Cancel Then
              cbEnableDeductions.CheckState = False
          End If
      End Sub
  </code></pre>