AnsweredAssumed Answered

VBA - PI Datalink - CalculatedData

Question asked by YoannCollinSubiron on May 3, 2017
Latest reply on May 4, 2017 by YoannCollinSubiron

Hello everyone,

I'm using PI Datalink with VBA Excel and I face a problem when I want to automate a Calculated Data through VBA.

I always have ERROR 1004.

Here is my code :

Worksheets("CountWindParc").Cells(t, 7).Formula = "=PIAdvCalcFilVal(" & NameTag & "," & StartDate & "," & EndDate & "," & NameFilter & ",""count"",""event-weighted"",""compressed"",""10m"",0,1,0,""\\fr-osi-01"")"

NameTag, NameFilter, StartDate and EndDate refer to string variables.

 

When I display this formula with a MsgBox that seems to be right (that's exactly how it should be written in a cell without vba).

 

Thanks in advance for your help.

 

 

Yoann.

Outcomes