|
-
Jun 12th, 2002, 01:19 AM
#1
Thread Starter
Member
Help me ,,,, 1 question only.
Hi, theres some thing wrong with my code, can anyone point out the error to me. i can't assign the value of col item to b1 .
*************************************
Set col as new collection
For i = col.Count to 1 Step - 1
b1 = col.Remove i
Next i
***********************************
is there any way where i can assgin the item value to b1 ??
-
Jun 12th, 2002, 01:31 AM
#2
PowerPoster
lol... you're trying to remove items from the collection and set a variable equal to the item you're removing. You can't do that. 
Collections hold objects, so b1 must be an object variable. If you want to add b1 to the collection, you use this:
Dim col as New Collection ' not set
dim b1 As Form
'or dim b1 As Object
Set b1 = Form1
col.Add B1
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
|