View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Benabd Benabd is offline
external usenet poster
 
Posts: 3
Default OptionButton. Reset to 0

Hello,

If your OptionButton is in a UserForm, you can reset the OptionButton
to 0 using the following:

For Each Control In UserForm.Controls
If Left(Control.Name, 12) = "OptionButton" Then
Control.Value = False
End If
Next Control

For me, I use a prefix for all control to help me do such loops.
Example for OptionButtons, I'd use "ob"
obFirstChoice,
obSecondChoice,
etc.

I hope this helps.
Karim