vba array dimensions

The solution for “vba array dimensions” can be found here. The following code will assist you in solving the problem.

Public Function ArrayDimensions(ByRef Arr As Variant) As Integer
Dim indDim As Integer
Dim result As Integer
On Error Resume Next
Do
indDim = indDim + 1
result = UBound(Arr, indDim)
Loop Until err.Number <> 0
ArrayDimensions = indDim – 1
End Function

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts