[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

control array size

Posted on 2002-04-17
2
Medium Priority
?
130 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 400 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses

872 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