View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default ActiveX ToggleButton Reset

You could use a macro like:

Option Explicit
Sub testme02()
Dim OLEObj As OLEObject
Dim wks As Worksheet

Set wks = Worksheets("Sheet1")

For Each OLEObj In wks.OLEObjects
If TypeOf OLEObj.Object Is msforms.ToggleButton Then
OLEObj.Object.Value = False
End If
Next OLEObj

End Sub


John wrote:

I have a sheet with several hundred ActiveX Toggle buttons. After running
some code, I need to reset them all so their value = False. Is there a way to
do with with out typing out ToggleButtonX.Value = False 300+ times?

Thanks!


--

Dave Peterson