Ho un array di array arrAggregatedArrays(1 to 8)
Perché non posso passare un array (all'interno di un array) come argomento?
posso chiamare un sub in questo modo:
call sub(ArrNewClient)
Ma ottengo un errore di compilazione: "Non corrispondenza del tipo" se provo questo:
call sub(arrAggregatedArrays(1))
Perché? E c'è un modo per aggirarlo?
e perché non riconosce arrAggregatedArrays(1)
come una matrice anche se eseguirà funzioni come UBound
su di esso come normale?
Public arrAggregatedArrays() As Variant '/ Holds all the sheet-Data Arrays
'/ dichiarata in un modulo separato
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)
e uno screenshot: Compile Error
Devi mostrarci le tue dichiarazioni e come questa variabile è inizializzata. – RBarryYoung
Scuse, dettagli aggiunti. – Kaz
@Zak - Ora dobbiamo solo vedere la dichiarazione della funzione per 'FilterSheetArrayForColumns()'. La mia ipotesi è che tu la stia ricevendo come 'A() As Variant' invece di' a As Variant'. Le varianti sono speciali. La variabile può essere utilizzata da sola per rappresentare una matrice. – Bond