Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |