ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
On my userform i select a value from ComboBox2
Its corresponding value is then shown in the way of an Option Button
Example of issue i see.
I select ListIndex1 value & then OptionButton 2 & 4 are visible which is correct.
BUT
If the user the decides he made the wrong ListBox selection & then selects ListIndex3 value OptionButton 5 & 6 are then shown BUT OptionButtion 2 & 4 are still also shown.
How can we somehow reset the OptioButton if the ListIndex selection are selected more than once
Thanks
I believe the code below is what you require
Its corresponding value is then shown in the way of an Option Button
Example of issue i see.
I select ListIndex1 value & then OptionButton 2 & 4 are visible which is correct.
BUT
If the user the decides he made the wrong ListBox selection & then selects ListIndex3 value OptionButton 5 & 6 are then shown BUT OptionButtion 2 & 4 are still also shown.
How can we somehow reset the OptioButton if the ListIndex selection are selected more than once
Thanks
I believe the code below is what you require
Rich (BB code):
Private Sub ComboBox2_Change()
ComboBox2 = UCase(ComboBox2)
If ComboBox2.ListIndex = 0 Then
OptionButton5.Visible = True
OptionButton6.Visible = True
Label8.Visible = True
Label9.Visible = True
End If
If ComboBox2.ListIndex = 1 Then
OptionButton2.Visible = True
OptionButton4.Visible = True
Label8.Visible = True
Label9.Visible = True
End If
If ComboBox2.ListIndex = 2 Then
OptionButton5.Visible = True
OptionButton6.Visible = True
Label8.Visible = True
Label9.Visible = True
End If
End Sub