Results 1 to 2 of 2

Thread: Help me ,,,, 1 question only.

  1. #1

    Thread Starter
    Member
    Join Date
    May 2002
    Posts
    45

    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 ??

  2. #2
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819
    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
  •  



Click Here to Expand Forum to Full Width