Solved

controls and properties

Posted on 1998-12-13
5
164 Views
Last Modified: 2013-11-25
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
Comment
Question by:dcsorillia
5 Comments
 
LVL 2

Expert Comment

by:JiaH
ID: 1449874
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
 
LVL 15

Expert Comment

by:Eyal
ID: 1449875
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
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1449876
Jiah are wrong
Eyal is making life to difficult, there is an easier answer.

0
 

Accepted Solution

by:
fduah earned 100 total points
ID: 1449877
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
 

Author Comment

by:dcsorillia
ID: 1449878
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question