Except for an array of variants, each element of an array is of the same type.
Each item in a given collection can be anything.
Arrays are referenced by a numeric index.
Collection items can be referenced by their key, or by a numeric reference. (The number for a particular item can change, if items are deleted from the collection.)
Arrays can be multi-dimensional, collections cannot.
I believe array elements are always faster to reference, but they are often not as useful as collections.
Option Compare sets how strings will be compared to each other.
With Option Compare Text, "AbC" is = to "abc".
With Option Compare Binary, "AbC" is not = to "abc".
If you need explicit text comparisons, where case-sensitivity matters, use Option Compare Binary.
If you find yourself using . . . UCase(x) = UCase(y) . . . types of conversions all over the place to make your code work, think about setting Option Compare Text to ease the case-checking rules.
|