T tcb Nov 7, 2007 #1 I would like code that would enumerate all controls on a form returning their names and types. Thank you.
I would like code that would enumerate all controls on a form returning their names and types. Thank you.
A Arvin Meyer [MVP] Nov 7, 2007 #2 You should be able to figure it out from the code at: http://www.datastrat.com/Download/FixNames2K.zip
You should be able to figure it out from the code at: http://www.datastrat.com/Download/FixNames2K.zip
A Allen Browne Nov 8, 2007 #4 Dim ctl As Control For Each ctl in Me.Controls Debug.Print ctl.Name, ctl.ControlType Next Here's a function that shows the name instead of the number of the control type: http://allenbrowne.com/ser-73.html#ControlTypeName
Dim ctl As Control For Each ctl in Me.Controls Debug.Print ctl.Name, ctl.ControlType Next Here's a function that shows the name instead of the number of the control type: http://allenbrowne.com/ser-73.html#ControlTypeName