I only use variants when necessary.
For the missing capability of VB6.
e.g.
Calling a method.
Public Function Add(vKey as Variant, vItem as variant)
I allow a key to be any alphanumeric. e.g. 123A
IsNumeric(12.3) says numeric but cannot be used as a index (whole
numbers only) but could be a key. A whole number is an index.
vKey can be a whole number index into my DB or a string Key into my DB.
vItem can be any type including an Array(1,2,3) of subitems.
I can also initialize the DB with multiple vItems.
I have this all working and provides me a class that is very powerful.
And best, the data is held in a multidimensional array so saving and
loading is fast and easy. The size is limited by memory and is adequate
for my purposes and I have total control. No databases for me for this
type of thing. My persisting a collection is now not needed.
I insert and remove intermediate items in the sorted array using
CopyMemory so adjusting a sorted array is fast.
I use BinarySearch to locate an item by the key.