Link to home
Start Free TrialLog in
Avatar of Vogon
Vogon

asked on

Control Names

How do I get the name of a control (any control) at run time using code ?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of simonbennett
simonbennett

...to be more specific

Public Sub Command1_OnClick()

   Dim cntControl as Control

   For Each cntControl In Me.Controls
      msgbox cntControl.Name
   Next cntControl

End Sub

If this suits, please accept ryancys answer over mine.

HTH

Simon