This seems to work fine, but you forgot the "End Sub" at the end of the code snippet.
And also - unless your email address ends with osisoft.com you don't have access to 'TSwiki'
Thanks for your mention. The link you saw is the internal one, I will look for the external if have. Thanks for checking my code, and I have modified that.
I am getting the error User-defined type not defined. Do you know how to fix this?
Thanks in advance
Did you add references to the PISDK 1.3 Type Library (Tools > References)?