Thread: option buttons
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default option buttons

Forms toolbar controls or Control Toolbox Toolbar controls?

for the latter

for each obj in Activesheet.OleObjects
if typeof obj.Object is MSforms.OptionButton or _
typeof obj.Object is MSforms.Checkbox then
obj.Object.Value = False
end if
Next


for forms controls

Sub ABCDEF()
Dim cbx As CheckBox, obtn As OptionButton
For Each cbx In ActiveSheet.CheckBoxes
cbx.Value = xlOff
Next
For Each obtn In ActiveSheet.OptionButtons
obtn.Value = xlOff
Next
End Sub

--
Regards,
Tom Ogilvy

"Gina" wrote:

Hi,

I need some help on option buttons and tick boxes that I have on an Excel
worksheet. I have a button which I would like to run a macro which will
'refresh' the form so that any selections made are unselected but i can't
figure out how to do this option boxes and tick boxes. Can anyone please
help?

Gina