Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting a CheckBox Value to False
Hi: I'd like to set a checkbox value to false after selection of an item
from a Combo Box. I've tried various things, but cannot seem to get the correct syntax. Both the Combo Box and Check Box are on a User Form. The latest code tried is: Private Sub cmbMembers_Change() If Val(cmbMembers.Value) 0 Then Cells(cmbMembers.Value, 1).Select CheckBox1.Enabled = True: Value = False Else CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False End If End Sub Any help will be appreciated... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting a CheckBox Value to False
Hi
You must use the value property of the checkbox CheckBox1.Value = False -- Regards Ron de Bruin http://www.rondebruin.nl "The Hawk" wrote in message ... Hi: I'd like to set a checkbox value to false after selection of an item from a Combo Box. I've tried various things, but cannot seem to get the correct syntax. Both the Combo Box and Check Box are on a User Form. The latest code tried is: Private Sub cmbMembers_Change() If Val(cmbMembers.Value) 0 Then Cells(cmbMembers.Value, 1).Select CheckBox1.Enabled = True: Value = False Else CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False End If End Sub Any help will be appreciated... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting a CheckBox Value to False
Folks: I figured it out. Here's the final code:
Private Sub cmbMembers_Change() If Val(cmbMembers.Value) 0 Then Cells(cmbMembers.Value, 1).Select CheckBox1.Enabled = True CheckBox1.Value = Cells(cmbMembers.Value, 4) Else CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False End If End Sub Thanks... "The Hawk" wrote: Hi: I'd like to set a checkbox value to false after selection of an item from a Combo Box. I've tried various things, but cannot seem to get the correct syntax. Both the Combo Box and Check Box are on a User Form. The latest code tried is: Private Sub cmbMembers_Change() If Val(cmbMembers.Value) 0 Then Cells(cmbMembers.Value, 1).Select CheckBox1.Enabled = True: Value = False Else CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False End If End Sub Any help will be appreciated... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting a CheckBox Value to False
Private Sub cmbMembers_Change()
If Val(cmbMembers.Value) 0 Then Cells(cmbMembers.Value, 1).Select CheckBox1.Enabled = True CheckBox1.Value = False Else CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False End If End Sub "The Hawk" wrote in message ... Hi: I'd like to set a checkbox value to false after selection of an item from a Combo Box. I've tried various things, but cannot seem to get the correct syntax. Both the Combo Box and Check Box are on a User Form. The latest code tried is: Private Sub cmbMembers_Change() If Val(cmbMembers.Value) 0 Then Cells(cmbMembers.Value, 1).Select CheckBox1.Enabled = True: Value = False Else CheckBox1.Enabled = False CheckBox2.Enabled = False CheckBox3.Enabled = False End If End Sub Any help will be appreciated... |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting a CheckBox Value to False
or With CheckBox1 ..Enabled = True ..Value = False End With -- Raman325 ------------------------------------------------------------------------ Raman325's Profile: http://www.excelforum.com/member.php...o&userid=24748 View this thread: http://www.excelforum.com/showthread...hreadid=395909 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting a CheckBox Value to False
Or: 'I am assuming the name of the form is UserForm1 UserForm1.Controls("CheckBox1").Value = False Hope this helps theguz -- theguz ------------------------------------------------------------------------ theguz's Profile: http://www.excelforum.com/member.php...o&userid=24918 View this thread: http://www.excelforum.com/showthread...hreadid=395909 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
[excel] checkbox = false = ukryj kilka komórek/wierszy/kolumn | Excel Discussion (Misc queries) | |||
I need to create a simple checkbox that has true false outputs | Excel Discussion (Misc queries) | |||
Setting Default of Checkbox based on value of combobox | Excel Programming | |||
Checkbox toggle true/false | Excel Programming | |||
Setting LinkedCell on a CheckBox Control | Excel Programming |