#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default GroupName

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default GroupName

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


-----Original Message-----
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



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default GroupName

Many thanks for your solution Patrick.
Works fine.

-----Original Message-----
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


-----Original Message-----
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



.

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"