Results 1 to 9 of 9

Thread: [RESOLVED] Combobox Multiple Conditions

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2021
    Posts
    191

    Resolved [RESOLVED] Combobox Multiple Conditions

    Hi All,

    Could someone please tell me where I am going wrong with this? I have tried a few different scenarios of which none are working. The only value when selected that works is the first one "Winding". I need the YESNoCancel message to show up ONLY if none of these 3 selections have been chosen in the combobox. I have tried "If Not....Or If Not...Or If Not" , "If Not...If Not...If Not" , "If Not...OrElse...OrElse"


    Code:
    If Not CmbProcess.SelectedItem = "Winding" Or CmbProcess.SelectedItem = "Gap Seal" Or CmbProcess.SelectedItem = "Bonding" Then
    Dim result As DialogResult = MessageBox.Show("   Did this part FAIL?", "", MessageBoxButtons.YesNoCancel)
                If result = DialogResult.Cancel Then
                    testResults = "Cancelled"
                    Exit Sub
                ElseIf result = DialogResult.No Then
                    testResults = "Pass"
                    rButton = Panel1.Controls.OfType(Of RadioButton).FirstOrDefault(Function(r) r.Checked = True)
                    BtnDrop.PerformClick()
                ElseIf result = DialogResult.Yes Then
                    Me.Height = 160
                    Me.Top = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - Me.Height * 1.6
                    testResults = "Fail"
                End If
            End If
    Last edited by mikeg71; Mar 25th, 2021 at 12:24 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width