Hi
In Excel 2003 VBA, what is the syntax for controling an Option Button or Checkbox by name or caption
I have tried the following but has an error, I am sure this is a simple one...
Re Dave![]()
Please Login or Register to view this content.
Hi
In Excel 2003 VBA, what is the syntax for controling an Option Button or Checkbox by name or caption
I have tried the following but has an error, I am sure this is a simple one...
Re Dave![]()
Please Login or Register to view this content.
Last edited by Dave Taylor; 10-08-2009 at 05:26 PM. Reason: Add application name
Hello Dave Taylor,
Welcome to the Forum!
You were very close to getting it. The Controls object is a Collection object. Collections generally can be indexed either by a number or string. You code should look like this...
![]()
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Hi Leith
Thanks for that, but that won't do what I need.
I have 10 check boxes, I want to look at check boxes 2 -10.
If any of the Check boxes 2 to 10 are checked I want to uncheck "checkbox 1"
I can test the boxes using the "For Each" but at the end I want to set a particular known box.
Hope thats clear, I was hoping to find a syntax to address a single item.
Re Dave
Hello Dave,
Here is sample loop to test check boxes 2 through 10 and if any are checked then "Checkbox1" is unchecked.
![]()
Please Login or Register to view this content.
Last edited by Leith Ross; 10-08-2009 at 07:58 PM. Reason: Provided wrong code for the question
Sorted
Many thanks for your help
Re Dave
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks