Solved

control array size

Posted on 2002-04-17
2
115 Views
Last Modified: 2010-05-02
Hi
I am passing a control array to a precedure. Is there a way to find the size of the control array so that I can loop through it or does "For each" work for it.
An example would be appreciated
Thanks

merlin007
0
Comment
Question by:merlin007
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
ID: 6947472
For each should work, alternatively you have

Control.LBound
Control.UBound
Control.Count

So you could use

For i = 0 To Control.Count - 1
  Control(i).Caption = "Hello"
Next
0
 

Author Comment

by:merlin007
ID: 6947499
Thanks Tim

merlin007
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

840 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