|
-
Mar 3rd, 2005, 12:03 PM
#1
Thread Starter
New Member
For...Next loop for 1-D array and labels
Hello Everyone! First post here, hope it won't be my last. Wondering if someone can give me a hand with a problem:
On the form, I have labels, grouped together, named cell1, cell2, cell3, etc.
There are 20 cells total, with an integer pre-positioned in each one. I want to simplify the coding so that a For...Next loop will put all those number in the array for me:
Dim Numbers(19), x As Short
For x = 0 To 19
Numbers(x) = cellx.Text
Next x
My problem is VB.NET doesn't like using the variable as the cell number ("cellx.Text"). How do I get the variable x to represent the cell number I'm working with for each cycle of the loop?
I'm sure it's a simple solution, but I'm somewhat new to this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|