[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

controls and properties

a) how do I get the names of the controls on a form?

b) how do I get the names of the properties of each control?
0
dcsorillia
Asked:
dcsorillia
1 Solution
 
JiaHCommented:
For (a) , you can use the controls collection to get each item in it such as "For each ctrX in me.controls" , the control's name is ctrX.name.

For (b) Vb don't support this.
0
 
EyalCommented:
For part a JiaH is correct but for part b of your question he is wrong. You can get all the properties and methods From the IDE in add-ins component or from microsoft unsuported dll
0
 
MirkwoodCommented:
Jiah are wrong
Eyal is making life to difficult, there is an easier answer.

0
 
fduahCommented:
here are your answers:
(a)
   dim ctrl as control
   for each ctrl in form.controls
      msgbox ctr.name
   next

b(b)
  dim pr as property
    for each pr in control
       msgbox  pr.name
    next



0
 
dcsorilliaAuthor Commented:
fduah,

The first part of your answer works correctly.  I knoew that was the easy part.  

As for the second part:

Dim pr as property  <-- vb reports that property is an undefined user type.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now