If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
CheckBox Ticked, ComboBoxBox visible?
I have the following code below only works when the userform is displayed. If
I un-check the checkbox which then hides a combobox. If then close the userform and reopen it again the combobox is visible even though the checkbox is not ticked. How can I get over this problem? Private Sub CheckBox62_Change() If CheckBox62.Value = True Then ComboBox7.Visible = True Label106.Visible = True Else CheckBox62.Value = False ComboBox7.Visible = False Label106.Visible = False End If End Sub |
#2
|
|||
|
|||
CheckBox Ticked, ComboBoxBox visible?
Hi hoyos
add following to your code Private Sub UserForm_Initialize() ComboBox7.Visible = False Label106.Visible = False End Sub Regards Om "hoyos" wrote: I have the following code below only works when the userform is displayed. If I un-check the checkbox which then hides a combobox. If then close the userform and reopen it again the combobox is visible even though the checkbox is not ticked. How can I get over this problem? Private Sub CheckBox62_Change() If CheckBox62.Value = True Then ComboBox7.Visible = True Label106.Visible = True Else CheckBox62.Value = False ComboBox7.Visible = False Label106.Visible = False End If End Sub |
#3
|
|||
|
|||
CheckBox Ticked, ComboBoxBox visible?
Many thanks OM that works well.
"om" wrote: Hi hoyos add following to your code Private Sub UserForm_Initialize() ComboBox7.Visible = False Label106.Visible = False End Sub Regards Om "hoyos" wrote: I have the following code below only works when the userform is displayed. If I un-check the checkbox which then hides a combobox. If then close the userform and reopen it again the combobox is visible even though the checkbox is not ticked. How can I get over this problem? Private Sub CheckBox62_Change() If CheckBox62.Value = True Then ComboBox7.Visible = True Label106.Visible = True Else CheckBox62.Value = False ComboBox7.Visible = False Label106.Visible = False End If End Sub |
Thread Tools | |
Display Modes | |
|
|