Can someone tell me how to cycle through all the controls in a worksheet? I tried this:
But this resulted in an "object required" error. Apparently the worksheet object does not have a controls collection.![]()
Private Sub CommandButton1_Click() Dim ctrl As Control Dim blad As Worksheet For Each blad In ActiveWorkbook.Worksheets Debug.Print blad.Name For Each ctrl In Controls Debug.Print ctrl.Name Next ctrl Next blad End Sub
Bookmarks