Subscript Out of Range error 9

Hii there,

In VBA i declared an array dim x1(0 to 10) as variant

and now am trying to assign a value to x1(0) = 0

Its showing me the following error:

Subscript Out of Rnage error 9


Any suggestions
Thx
Vishal Patel
SolidworksApi macros