Does anyone know of a way to print out the control names when your programming? VB lets you printout code and pictures of the forms or text of the forms, but I would like to print out the control names from each form, with or without properties.
Thanks in advance,
richcg
06-11-2002 at 06:26 PM
|
Harrism Level: Guest
Re: vb printing of code
Dim Frm as Form
Dim Crt as Control
For each Frm in Froms
For each Crt in Frm.Controls
Debug.Print Frm.Name & " " & Crt.Name
Next Crt
next Frm
This is only avalible at runtime but if you put this code in a Procedure and allow it to run at runtime then as you can see it will find each form in the forms collection then each control in that form and print out to the immediate window the form name followed by each individual control name.
You could output to a file rather than the immediate window if you want that code just ask.
If you just want the controls for the current form you are in the