Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a form with 24 checkboxes. (CheckBox1...CheckBox24) Is there a way to make the following work? This works... If CheckBox3 Then MsgBox "Three" This doesn't... i = 3 z = "CheckBox" & LTrim(Str(i)) If z Then MsgBox "Three" Thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the Checkboxes are in a userform, try this:
z = Me.Controls("CheckBox" & i).Object .Value -- Regards, Juan Pablo González "Robert Lowe" wrote in message ... Hi, I have a form with 24 checkboxes. (CheckBox1...CheckBox24) Is there a way to make the following work? This works... If CheckBox3 Then MsgBox "Three" This doesn't... i = 3 z = "CheckBox" & LTrim(Str(i)) If z Then MsgBox "Three" Thank you |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank a lot...
It works great. I would never have gotten it! I have MUCH to learn.... Robert "Juan Pablo Gonzalez" wrote in message ... If the Checkboxes are in a userform, try this: z = Me.Controls("CheckBox" & i).Object .Value -- Regards, Juan Pablo González "Robert Lowe" wrote in message ... Hi, I have a form with 24 checkboxes. (CheckBox1...CheckBox24) Is there a way to make the following work? This works... If CheckBox3 Then MsgBox "Three" This doesn't... i = 3 z = "CheckBox" & LTrim(Str(i)) If z Then MsgBox "Three" Thank you |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Robert,
This is how you do it If Me.Controls("Checkbox" & i).Value = True Then MsgBox "Found" End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Robert Lowe" wrote in message ... Hi, I have a form with 24 checkboxes. (CheckBox1...CheckBox24) Is there a way to make the following work? This works... If CheckBox3 Then MsgBox "Three" This doesn't... i = 3 z = "CheckBox" & LTrim(Str(i)) If z Then MsgBox "Three" Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variable substitution | Excel Discussion (Misc queries) | |||
variable substitution in a formula linking to external workbook | Excel Discussion (Misc queries) | |||
variable substitution in a formula | Excel Discussion (Misc queries) | |||
substitution | Excel Discussion (Misc queries) | |||
Cell/Variable content substitution | Excel Programming |