AnsweredAssumed Answered

Create a multi-state of a value in a Form using VBA

Question asked by Mikeconnors on Jun 3, 2016

Hi All,


I have built a display where when a button is clicked, a Form appears with server information on it. how do I multi-state the values in that Form? I need them to go red when they are too high.


below is the code I've used to pull a tag from the AF and display it in the Form as a label. Can I now multi-state that tag value?


Sub GetTagValue()  Dim tagname As String Dim tagvalue As String   Dim tag As PIPoint Dim mysrv As Server  Set mysrv = PISDK.Servers.Item("WAIOHistorianSandbox") tagname = mysrv.PIPoints("Perth.Port.AF.Server_w/lowest_Archive_Space") tagvalue = mysrv.PIPoints(tagname).Data.Snapshot  LabelTagTest.Caption = tagvalue  End Sub