I need to add the var in array
Public Sub Testprog() Dim test As Variant Dim iCounter As Integer If test = Empty Then iCounter = 0 test(iCounter) =
The Array index only accepts a long value.
You declared iCounter as an integer. You should declare it as a long.