LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default On the lack of control arrays.

I am using Excel 97.

As fas as I understand VB in Excel does not have control arrays, no controls
have an index property.

On a form I have seven labels called lbl1 to lbl7. I would like to set their
captions to a(i) where a is an array and i runs from 1 to 7.

The code below does not work:

for i = 1 to 7
labelname = "lbl" & format(i)
&labelname.caption = a(i)
next

but is there a way to construct the name of the control as a string, and
then use it?

I would hate to have to say:
lbl1.caption = a(1)
lbl2.caption = a(2)
etc

Any help is greatly appreciated.

Sincerely,
Jan Nordgreen


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting the lack of a union of two lists Skippy Howenstein Excel Worksheet Functions 2 February 23rd 10 02:25 PM
Excel lack of compatibility robbiebell22 Excel Discussion (Misc queries) 1 July 23rd 08 01:30 AM
Control arrays on Excel 2007 userforms Informative Excel Discussion (Misc queries) 1 February 26th 08 09:36 PM
Help with GUI (for lack of a better term) Mike in Saukville Excel Discussion (Misc queries) 1 February 21st 07 09:55 PM
Nice idea lack of knowledge! carnelain Excel Discussion (Misc queries) 3 March 21st 06 07:40 PM


All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"