I have several named ranges inside my Excel sheet where I store data for VBA Macros between sessions. When loading I need to get that data into multiple arrays (String and Booleans).
Dim arr() As Variant
Dim rg As Range
Set rg = Sheets("Calc").Range("myRange")
arr = rg.Value2
How can I typecast arr() into a String or Boolean array for use in my macro?
If I try and use Variant arrays instead I get ByRef argument mismatch errors on function calls.
Or Is there maybe another way to get the contents of the ranges into an array of other type than Variant?
Searching did not yield a result on the latter question.
CStr(arr(1, 1))- or do you pass the entire array into your function?If VarType(v) = vbBoolean Then?