AnsweredAssumed Answered

Excel VBA calling Datalink function directly

Question asked by John_Fors on Sep 23, 2016
Latest reply on Sep 23, 2016 by John_Fors

I'm doing a query of many PI tags referenced as an AFElement-Attribute looking at compressed data points for a value change pattern.  I'm using Excel/VBA  as my development environment where I can use datalink to visualize the data.  I would like to be able to not use spreadsheet references in automating the search criteria but would like to get an array of compressed data to programmatically scan the data.


I thought I could reference the Datalink function calls directly from VBA, but my memory is old in the technique to do so, as I can't get VBA to recognize the function call.



Sub DataLinkQuery()

Dim Results As Variant


Results = datalink.PICompDat("\\AFServer\afDB\HMRoot\opcint2|Device_Status_Hlth", "1-sep-2016", "*", 1, "", "inside")


End Sub


Is there a way I can get VBA to resolve the function reference?