B
Brian
Hello All,
I am trying to use an option group to control which labels and combo boxes
are visible. My code is as follows:
Private Sub OptionButton1_Click()
If OptionButton1.Value = True Then
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Label6.Visible = True
ComboBox1.Visible = False
ComboBox2.Visible = False
ComboBox3.Visible = False
ComboBox4.Visible = True
Label7.Visible = True
Label8.Visible = True
ComboBox5.Visible = True
ComboBox6.Visible = True
End If
End Sub
Private Sub OptionButton2_Click()
If OptionButton2.Value = True Then
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Label6.Visible = True
ComboBox1.Visible = True
ComboBox2.Visible = True
ComboBox3.Visible = True
ComboBox4.Visible = True
Label7.Visible = False
Label8.Visible = False
ComboBox5.Visible = False
ComboBox6.Visible = False
End If
End Sub
It works, but it doesn't happen instantaneously (i.e. you can visibly see
the controls disappear then reappear). Is there anyway for this to happen
quicker?
FYI - I'm using Excel 2007
Thanks in advance
I am trying to use an option group to control which labels and combo boxes
are visible. My code is as follows:
Private Sub OptionButton1_Click()
If OptionButton1.Value = True Then
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Label6.Visible = True
ComboBox1.Visible = False
ComboBox2.Visible = False
ComboBox3.Visible = False
ComboBox4.Visible = True
Label7.Visible = True
Label8.Visible = True
ComboBox5.Visible = True
ComboBox6.Visible = True
End If
End Sub
Private Sub OptionButton2_Click()
If OptionButton2.Value = True Then
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Label6.Visible = True
ComboBox1.Visible = True
ComboBox2.Visible = True
ComboBox3.Visible = True
ComboBox4.Visible = True
Label7.Visible = False
Label8.Visible = False
ComboBox5.Visible = False
ComboBox6.Visible = False
End If
End Sub
It works, but it doesn't happen instantaneously (i.e. you can visibly see
the controls disappear then reappear). Is there anyway for this to happen
quicker?
FYI - I'm using Excel 2007
Thanks in advance