Re: ArrayList or equiv in VBA?

Am 24 Jul 2006 18:11:42 -0700 schrieb survivalist@xxxxxxxxx:

You can use collections:

Dim col as VBA.Collection
Set col=New VBA.Collection

or an array, e.g. for 10 items (0 to 9):

Dim ar(9) As Variant ' or As String etc.

or an expandable array:

ReDim ar(9) as Variant
ReDim ar(19)

If you need a chained list you´d have to build that yourself.

Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- --


I'm looking for something like ArrayList in VBA. I can't seem to find
anything...or is there a way to use the standard VB collections?


Relevant Pages

  • Re: Array Declaration Problem ??
    ... the declaration ReDim awas commented out in Function Zroots. ... Function ZrootsAs Variant() ... Dim j As Integer, its As Integer ... Enter on a worksheet the function "MyRoots() and select a 4 Row*2 Column ...
  • Re: shape range help
    ... However initial use of Dim() avoided use of brackets and he ... Everytime with ReDim only, I get a Variant() ... never in a session I don't do the initial Dim varr() then redim does NOT ...
  • Re: Array Declaration Problem ??
    ... Function MyRoots (a As Variant, m As Integer, polish As String) ... Dim Roots As Variant ... ReDim ad ...
  • Re: Re:workdays
    ... Optional Holidays As Variant = Nothing, ... Dim arrayH As Variant ... ' or not an array or cell range with at least one numeric value between ... ReDim arrayH) As Variant ...
  • Re: How do I Create ragged arrays in Excel VBA?
    ... Sub RaggedArray() ... Dim AAs Variant, i As Long, j As Long ... As Variant ... ReDim A ...