Shawn,I added this
vartypename($array) ?
before and after the $array=0 and uncommented it.
KiX said:
Before = Variant[]
After = Long
I also tried this
redim $array
instead of $array=0 and KiX said:
Before = Variant[]
After = Empty
Then I popped a few
"number = " vartypename($number) ?
lines in and saw that $number goes from Empty to Long and stays as Long.
Putting a vartype($array) ? at the top, after $array was filled and before it was used in the FOR EACH loop and it was EMPTY.
It looks to me that you can't put a VARIANT[] in the xxxx of FOR EACH xxxx IN array command. But a LONG or EMPTY is ok.
cj