Hello All,
I just started to use vba an pisdk together.
I would like to get timed data from a pipoint into a vba variable.
Here is a quick code
Option Explicit
Dim srv As Server
Dim pt As PIPoint
Sub main()
Dim point As String
Dim a As Variant
Dim t As New PITimeFormat
Dim j(0) As Date
point = "364-FY-0288-UPV"
Set srv = Servers("xxx")
Set pt = srv.PIPoints(point)
t.InputString = Format(CDbl("4/24/2014 11:29:00 PM"), "dd-mmm-yyyy hh:mm:ss")
a = pt.Data.TimedValues(t)
End Sub
(I replaced server name by xxx) It does not work and a window pop up saying "Wrong number of argument or invalid property assigned".
Somebody could help me please?
Thank you.