GroupName

P

Paul

Hi, using XL 2000.

I have specified 10 optionbuttons (OptionButton1 -
OptionButton10) and assigned the groupname 'Test' to each.

I need to assign a command button which will 'reset' the
value of each OptionButton to False. I could do this for
each OptionButton but I figured there must be a simplified
routine that could accomplish this. Any Ideas?

Many thanks, Paul
 
P

Patrick Molloy

loop through the Controls collection
if your controls have a name beginning with say 'opt'
then your loop could be

dim ctrl as control
For Each ctrl in Controls
if left(ctrl.name,3)="opt" then
'reset the control here
end if
Next

Patrick Molloy
Microsoft Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top