The error is because you DID NOT supply an valid point coordinate in the form of Double array. That is, the code declares an variable pt as an array of Double, but does not fill the 3 elements of the array with values, thus, pt is an EMPTY array.
To correct your code, you need to specify a valid point coordinate:
Dim pt(2) As Double
pt(0) = 0.0 : pt(1) = 0.0 : pt(2) = 0.0 '' assume you insert the table at (0, 0, 0)
...