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




Reply With Quote
