List of all controls used on a form?

M

martinmike2

Is there a way to print off a list of all the controls used on a
form? I need to scrub my VB Project to make sure i dont have extra
stuff thats not relevant anymore.
 
J

John W. Vinson

Is there a way to print off a list of all the controls used on a
form? I need to scrub my VB Project to make sure i dont have extra
stuff thats not relevant anymore.

Start with Tools... Analyze... Documenter. There are some good third-party
tools for the purpose as well.
 
A

Al Campagna

martinmike2,

Public Sub ListControls()
Dim Ctl As Control
For Each Ctl In Me.Controls
Debug.Print ctl.Name
Next
End Sub

Also see... http://www.mvps.org/access/forms/frm0004.htm

Also, check out Toolbox Customize, and add the Form/Report Design - Object
to your Toolbox. It's gives you a combo box on your toolbox that lists all
controls on the form.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top