Solved

control array size

Posted on 2002-04-17
2
114 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

773 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