View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Disable optionbutton

Also I forgot to mention, I would like to disable about
24 Option button, it would be better if I could disable
then all with one command if possible.


You also forgot to mention where you got the OptionButtons from... the Forms
toolbar or the (ActiveX) Control Toolbox toolbar. Here is code for both (the
macro name should tell you which is which)...

Sub DisableFormsOptionButtons()
Worksheets("Sheet 1").OptionButtons.Enabled = False
End Sub

Sub DisableActiveXOptionButtons()
Dim OptBtn As OLEObject
For Each OptBtn In Worksheets("Sheet 1").OLEObjects
OptBtn.Object.Enabled = False
Next
End Sub

Rick Rothstein (MVP - Excel)