|
-
Nov 10th, 1999, 05:00 AM
#1
Thread Starter
Addicted Member
Hi. I have a small problem about creating a collection.
I sure know how to loop through all controls of a collection (for each ctl in form.controls). The problem is I would like to CREATE such a collection myself. (Ex.: I will add to a collection all the textboxes that the user have modified).
Afterward, I would to refer to this control. I'm not how could this be done.
Thanks for the help.
-
Nov 10th, 1999, 05:16 AM
#2
Junior Member
'Declare a collection
Dim something as New Collection
'Add the modified textbox in the collection
something.Add txtMyName
'Loop through the collection using For Each..Next
-
Nov 10th, 1999, 11:48 AM
#3
Thread Starter
Addicted Member
I already tried this. This code will add the VALUE of txtMyName to the collection.
Looping with For Each...Next through the collection won't allow me to refer to this control. Am I right?
I would like to loop through that collection and change the .value of these controls to something I will decide. Or let's just say I want to loop and set the collection's controls to .visible = false. How could I make such a reference?
Thanks!
-
Nov 10th, 1999, 08:09 PM
#4
Thread Starter
Addicted Member
...I tried to dim some variables AS CONTROL. And I thought I could do something like ctlMyControl.name = "txtControlName" but that property doesn't exist for such a new dimmed variable.
Still in need of any comments. Thanks.
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
|