Reputation: 726
If I have an array array2()
of a given type, say for example Single
, or String
, or any other type.
How do I define array2()
such that it has the same data type as array1()
?
something like this:
Dim array2() As TypeName(array1())
Upvotes: 2
Views: 297
Reputation: 7164
declaring everything as variant can introduce a fairly significant performance hit in some situations. you could always try the DataTypeofArray function at this site:
http://www.cpearson.com/excel/vbaarrays.htm
Upvotes: 0