Is This code correct for determining the number of elements in a single dimension variant array in Excel VBA. Supposing I have a variant array named Array1 with k elements.

```
Dim n as Integer
n = UBound(Array1)

```