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


Code
-------------------
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 'The controls of which object?
'als je blad bedoelt dan wordt het Blad.Controls
Debug.Print ctrl.Name
Next ctrl
Next blad

End Su
-------------------

--
Dnere
-----------------------------------------------------------------------
Dnereb's Profile: http://www.excelforum.com/member.php...fo&userid=2618
View this thread: http://www.excelforum.com/showthread.php?threadid=39756