View Full Version : [SOLVED:] Show visible if true
Emoncada
12-18-2007, 07:57 PM
How can I say in a userform that if any range of checkboxes are true then visible = True.
I have 6 Checkboxes if any 1 is True then CmdButtonUpdate.Visible = True Otherwise CmdButtonUpdate.Visible = False.
Any help would be great. Thanks
mikerickson
12-18-2007, 08:53 PM
With Userform1
.CmdButtonUpdate.Visible = .CheckBox1.Value Or .CheckBox2.Value Or .CheckBox3.Value _
Or .CheckBox4.Value Or .CheckBox5.Value Or .CheckBox6.Value
End With
Emoncada
12-18-2007, 09:03 PM
Cool only two things
1. Can this be a constant thing so if one is checked then unchecked for it not to be visible.
2. Can I hide a cmdbuttonclose when any of those values are true.
mikerickson
12-18-2007, 09:18 PM
1) Execute that line every time any of the CheckBox_Change events trigger.
2) Yes. Just replace the name of the command button.
Emoncada
12-18-2007, 09:40 PM
ok got the first one to work how can i make the 2nd one work
Emoncada
12-18-2007, 09:42 PM
I want CmdButtonClose.Visible = False when Any chkboxes are True
mikerickson
12-18-2007, 10:01 PM
Use
.CmdButtonClose.Visible = Not(.CheckBox1.Value Or .CheckBox2.Value...Or .CheckBox6.Value)
Emoncada
12-18-2007, 10:04 PM
Ok i got it i added an if statement in the change event sub
Emoncada
12-18-2007, 10:05 PM
ok that would work also thanks mikerickson
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.