Hi all, I have a problem that has be really tied around the axle. I have a worksheet(INTERFACE) that contains 3 comboboxes. Combobox1 is the main one that affects the entire sheet and what is being done. Based on certain values of combobox1, the other comboboxes become visible and usable. If combobox1 is set back to a default value of 0, I have the screen going back to nothing displayed (ie. combobox2 and 3 visibility = false). Everything works fine once the workbook is open but, during the opening process, it seems that all the subs for the comboboxes get triggered (I tried making it combobox1_click instead of _change and that did not help). One of the first checks in combobox1_click is to see if it's .value is 0. If so, set the visibility of combobox2 and 3 to false. The problem occurs during initialization of the workbook and I get an Object Required on the first ComboBox2.visible=false because the sheet does not yet recognize that there is a combobox2 yet (I found this by trying to type in me.comboBox... and it only had combobox1 as an available object). If I kill the vba from the popup error and let the workbook finish initializing, then go back into the exact same place in the combobox1_click code and try to put in me.combobox..., it shows all 3 as available objects. So my question is now, how do I either get the sub to recognize combobox2 and 3 OR keep the guts of the subs from running when I open the workbook?
Private Sub ComboBox1_Click()
Sheets("INTERFACE").Rows("9:60").Hidden = True
If ComboBox1.Value <> 0 Then
CommandButton1.Visible = True
Else
Sheets("Master").Range("A6") = 0 'set initial value in combobox2 linked cell
ComboBox2.Visible = False
Sheets("Sales").Range("A3") = 0 'set initial value in combobox3 linked cell
ComboBox3.Visible = False
CommandButton2.Visible = False
Exit Sub
End If
End If
... more stuff to do
Private Sub ComboBox1_Click()
Sheets("INTERFACE").Rows("9:60").Hidden = True
If ComboBox1.Value <> 0 Then
CommandButton1.Visible = True
Else
Sheets("Master").Range("A6") = 0 'set initial value in combobox2 linked cell
ComboBox2.Visible = False
Sheets("Sales").Range("A3") = 0 'set initial value in combobox3 linked cell
ComboBox3.Visible = False
CommandButton2.Visible = False
Exit Sub
End If
End If
... more stuff to do