Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Array - objects? (Excel 97)

    Howdy all!

    Question, is it possible to have a collection of objects? AND use them in an Array?

    Thanks, Darryl.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Array - objects? (Excel 97)

    Could you be a bit more precise in your question?

    Each object belongs to a collection, so no news there.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Array - objects? (Excel 97)

    Yes, you can create an array of objects:

    Dim arrCells(1 To 10) As Range
    Dim i As Long
    For i = 1 To 10
    Set arrCells(i) = Range("A" & i)
    Next i

    You can also use a collection (a Collection is a special object in Visual Basic). Usually, you use either one or the other. If you tell us what you want to accomplish, we might be able to provide more specific help.

  4. #4
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Array - objects? (Excel 97)

    Umm,

    I thought I was being specific You guys are the best! Thanks so much for your help!

    Darryl.

Posting Permissions

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