Hi All
I'm trying to use Chip Pearson's DistinctValues() function ( which should be pretty straightforward (following is just the relevant code):
But I'm getting a "Run-time error '13': Type mismatch" further down when I try to ReDim BigBoxArray():
I can't figure out why this is happening, since DistinctValues() returns an (variant) array. Any thoughts?
Many thanks,
Alex
I'm trying to use Chip Pearson's DistinctValues() function ( which should be pretty straightforward (following is just the relevant code):
Code:
Dim SdqAllIDsSSRSArray, SdqUniqueIDs, BigBoxArray() As Variant
Dim LastRowSdq As Integer
LastRowSdq = SSRS.Worksheets("sdq").Cells(Rows.Count, "A").End(xlUp).Row
SdqAllIDsSSRSArray = SSRS.Worksheets("sdq").Range(Cells(2, "A"), Cells(LastRowDiag, "A")).Value
SdqUniqueIDs = DistinctValues(InputValues:=SdqAllIDsSSRSArray, IgnoreCase:=True)
But I'm getting a "Run-time error '13': Type mismatch" further down when I try to ReDim BigBoxArray():
Code:
ReDim BigBoxArray(1 To UBound(SdqUniqueIDs, 1), 1 To 23)
I can't figure out why this is happening, since DistinctValues() returns an (variant) array. Any thoughts?
Many thanks,
Alex