I have combobox13 and textbox14 that reflects the combobox13 selection. I have another combobox1 and when I select "D18", Combobox13 uses a named field from my spreadsheet. If anything else is selected it uses a different defined field. However, I need it to first clear out what is in the combobox13 first, otherwise, the users will not realize the options in combobox13 are incorrect.
Within the same file, I had a solution for another set of comboboxes, but I have been unable to reuse it. I am pretty sure this is that code:
I came up with a different solution, but when I selected my button to write all the data from the textboxes to the spreadsheet Combobox13 and textbox14 went back to "". I had to remove that code, but I still don't have a solution to clear out the two boxes.
I am using some serious Nooby code because after all, I am a noob.
Any suggestions? I have searched the web and I have been unable to find exactly what I am looking for.
Sincerely,
Scott
Within the same file, I had a solution for another set of comboboxes, but I have been unable to reuse it. I am pretty sure this is that code:
Code:
With Me
.ComboBox2.ListIndex = -1 = .ComboBox1.ListIndex <> -1
.ComboBox2.ListIndex = -1 = .TextBox2.Value = ""
End With
I came up with a different solution, but when I selected my button to write all the data from the textboxes to the spreadsheet Combobox13 and textbox14 went back to "". I had to remove that code, but I still don't have a solution to clear out the two boxes.
I am using some serious Nooby code because after all, I am a noob.
Code:
Private Sub ComboBox1_Change()
'Engine Designation
x = ComboBox1.Text
TextBox1.Value = x
'load combobox 13 per the selection of Combobox 1
If ComboBox1.Value = "D18" Then
ComboBox13.RowSource = "All_Panels"
ElseIf ComboBox1.Value = "D24" Then
ComboBox13.RowSource = "Panels"
ElseIf ComboBox1.Value = "D34 - 74hp" Then
ComboBox13.RowSource = "Panels"
ElseIf ComboBox1.Value = "D34 - 130hp" Then
ComboBox13.RowSource = "Panels"
End If
End Sub
Private Sub ComboBox13_Change()
'Panel Model #
If TextBox14 = "MLC380 Panel\Harness" Then
TextBox16.Value = "-"
ElseIf ComboBox1.Value = "D18" Then
TextBox16.Value = "32-00-0197"
ElseIf ComboBox1.Value = "D24" Then
TextBox16.Value = "32-00-0197"
ElseIf ComboBox1.Value = "D34 - 74hp" Then
TextBox16.Value = "32-00-0173"
ElseIf ComboBox1.Value = "D34 - 130hp" And TextBox2.Value = "DL03-LER05" Then
TextBox16.Value = "32-00-0201"
ElseIf ComboBox1.Value = "D34 - 130hp" And TextBox2.Value = "DL03-SAR11" Then
TextBox16.Value = "32-00-0201"
ElseIf ComboBox1.Value = "D34 - 130hp" And ComboBox2.Value = "DL03-LEG01" Then
TextBox16.Value = "32-00-0173"
End If
Pa = ComboBox13.Text
TextBox14.Value = Pa
End Sub
'Panel Model
Pa = ComboBox13.Value
Range("B68").Value = Pa
Private Sub CommandButton1_Click()
Pa = ComboBox13.Value
Range("B68").Value = Pa
ComboBox13.Value = ""
ComboBox13.RowSource = ""
TextBox14.Value = ""
End Sub
Any suggestions? I have searched the web and I have been unable to find exactly what I am looking for.
Sincerely,
Scott