+ Reply to Thread
Results 1 to 3 of 3

How to create collection object

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    dubai
    MS-Off Ver
    Excel 2003
    Posts
    6

    How to create collection object

    How to create collection in office 2010 macro, VB 7.

    I'm following the MSDN but I still get errors. Can anyone show me a line that creates a collection then adds an item to it, with name and number?

    That would be great help.

    I'm only writing: Dim sampleVisualBasicColl As New Microsoft.VisualBasic.Collection()

    Error i get is: Compile Error - Expected End of Statement

    If I remove the brackets and write it like this, it works: Dim sampleVisualBasicColl As New Microsoft.VisualBasic.Collection

    also the Add function is not recognized.

    Any reference out there for my problem? something I could take a look at?


    Thanks.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to create collection object

    you are reading a vb.net page not a vba page. it should be
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    dubai
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: How to create collection object

    Thanks it worked. I tried googling "VB7 and Excel 2010" but kept finding other vb code, like .NET and some other one.

    Now I just need to find a website for creating for loop for this collection, other methods and etc.



    Thankee

    Edit: Can anyone say how to mark post as Solved? .. still looking
    Last edited by aymanzone; 08-13-2012 at 06:27 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1