A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

CheckBox Ticked, ComboBoxBox visible?



 
 
Thread Tools Display Modes
  #1  
Old November 17th, 2009, 06:16 AM posted to microsoft.public.excel.misc
Hoyos
external usenet poster
 
Posts: 75
Default 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  
Old November 17th, 2009, 06:46 AM posted to microsoft.public.excel.misc
om
external usenet poster
 
Posts: 23
Default 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  
Old November 17th, 2009, 07:48 PM posted to microsoft.public.excel.misc
Hoyos
external usenet poster
 
Posts: 75
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.