CATIA VBA function error

When I write VB script, getposition or setposition does not work, properly. 

I don't know why.....

Is there anyone solved this problem? 

the error message is as shown below: