AnsweredAssumed Answered

Login to PI server through VBA

Question asked by rgs on Aug 18, 2016
Latest reply on Jul 17, 2020 by pli


I use the following code to try to login on a PI Server to automatically read data, calculate it en put the results back on the PI Server.

After that I close the Excel application.

    On Error Resume Next

    Dim Cxn As New PISDKDlg.Connections

    Dim s As Server

    Set s = Cxn.Login(, "******", "******", False, False)


Until PI Datalink 2010 this was working fine but the company upgraded to PI Datalink 2014 and despite of the code, now when I open the Excel file it pops-up a login screen.

In this screen I have to put my login and pasword and select PI user authentication instead of windows authentication.


Is there a way in VBA programming to avoid this pop-up so that the excel file automatically can be run to do the job it was doing in the older version?


I try to find a programmers reference guide to VBA Datalink but cannot find it on your side of is the programmers reference of Procesbook the same as for PI Datalink?


Best Regards;