View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DeeJay[_5_] DeeJay[_5_] is offline
external usenet poster
 
Posts: 1
Default Cycling through controls in worksheet


Never mind. I used this:


Code
-------------------
Sub OLEObjects3()
'Delete/hide only all CommandButtons or ComboBoxes or ??? from the Control Toolbox
Dim obj As OLEObject
For Each obj In ActiveSheet.OLEObjects
If TypeOf obj.Object Is MSForms.CommandButton Then
obj.Delete
' or obj.Visible = False if you want to hide them
End If
Next
End Su
-------------------


And it works

--
DeeJa
-----------------------------------------------------------------------
DeeJay's Profile: http://www.excelforum.com/member.php...nfo&userid=542
View this thread: http://www.excelforum.com/showthread.php?threadid=39756