Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am doind a Userform with 20 checkbox on it. So to do their properties I would like to use a for next. I have try to do it with a string like str = checkbox & "k" but it doesn't work. And I don't know how to do it with an object. Do you know a way to do it ? Thanks for help Benjamin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Benjamin,
I am doind a Userform with 20 checkbox on it. So to do their properties I would like to use a for next. I have try to do it with a string like str = checkbox & "k" but it doesn't work. And I don't know how to do it with an object. Do you know a way to do it ? You need to create their names as a string, then use the Controls() property to get the object: Me.Controls("CheckBox " & k) Regards Stephen Bullen Microsoft MVP - Excel www.BMSLtd.co.uk |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Euh....
I am sorry but I am not sure of how do I create their name as a string Do I have to use checkbox.name to rename them Thanks for help Stephe Benjamin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for i = 1 to 10
controls("CheckBox" & i).Value = False Next as an example. another approach for each ctrl in Userform1.Controls if typeof ctrl is MSForms.CheckBox then ctrl.Value = false end if Next -- Regards, Tom Ogilvy "Ben.c" wrote in message ... Euh..... I am sorry but I am not sure of how do I create their name as a string ? Do I have to use checkbox.name to rename them ? Thanks for help Stephen Benjamin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checkbox | Setting up and Configuration of Excel | |||
Checkbox | Excel Discussion (Misc queries) | |||
Font Issues when using UserForm box after clicking a Checkbox | Excel Discussion (Misc queries) | |||
How to have Checkbox A uncheck with checked Checkbox B | Excel Discussion (Misc queries) | |||
Conditional Checkbox Creation on a UserForm | Excel Programming |