I have an array of arrays arrAggregatedArrays(1 to 8)
I can call a sub like this:
call sub(ArrNewClient)
But I get a compile error: "Type Mismatch" if I try this:
call sub(arrAggregatedArrays(1))
Why? And is there a way around it?
and why does it not recognise arrAggregatedArrays(1) as an array even though it will perform functions like UBound on it like normal?
Public arrAggregatedArrays() As Variant '/ Holds all the sheet-Data Arrays
'/ Declared in a seperate module
ReDim arrAggregatedArrays(1 To 8)
arrAggregatedArrays(1) = arrNewClient
arrAggregatedArrays(2) = arrExistingClient
arrAggregatedArrays(3) = arrGroupSchemes
arrAggregatedArrays(4) = arrOther
arrAggregatedArrays(5) = arrMcOngoing
arrAggregatedArrays(6) = arrJhOngoing
arrAggregatedArrays(7) = arrAegonQuilterArc
arrAggregatedArrays(8) = arrAscentric
Call FilterSheetArrayForColumns(arrAggregatedArrays(1))
Public Sub FilterSheetArrayForColumns(ByRef arrCurrentArray() As Variant)
and a screenshot:

FilterSheetArrayForColumns(). My guess is you're receiving it asa() As Variantinstead ofa As Variant. Variants are special. The variable can be used by itself to represent an array.arrayand asarray()?