View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Juan Pablo González Juan Pablo González is offline
external usenet poster
 
Posts: 226
Default VARIABLE SUBSTITUTION

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