B
BruceM
I have spent a fruitless half hour or so trying to find an answer to the
question of how to print a list of controls. I have found several answers
with code something like the following:
Public Sub ListControls()
Dim ctl As Control
For Each ctl In Me.Controls
Debug.Print ctl.Name
Next
End Sub
but I don't know what to do with the code. I have even tried adding a
command button to the form just for the purpose of running the code, but no
luck. I can click the command button, but the code doesn't seem to actually
do anything. Perhaps Print has a different meaning in the world of VBA. My
objective is to come up with a printed list of controls.
question of how to print a list of controls. I have found several answers
with code something like the following:
Public Sub ListControls()
Dim ctl As Control
For Each ctl In Me.Controls
Debug.Print ctl.Name
Next
End Sub
but I don't know what to do with the code. I have even tried adding a
command button to the form just for the purpose of running the code, but no
luck. I can click the command button, but the code doesn't seem to actually
do anything. Perhaps Print has a different meaning in the world of VBA. My
objective is to come up with a printed list of controls.