I am trying to set up a bar graph through VBA that uses a Pi Calculation as the Tag. I have already set up the Pi Calculation in the datasets window. It is just a simple percentage calculation based off a tag. I have set up bar graphs in VBA with normal Pi Tags with no problem. I have also set up Value objects with a Pi Calculation with no problem.
When I try to set the bar graph up, I get "The value format is incompatible with the specified tags."
OUTLETTEMP is the name of the Pi Calculation.
Sub OutputBarM() Dim OutputBar As Bar Set OutputBar = ThisDisplay.Symbols.Add(pbSymbolBar) With OutputBar .Name = "OutputBar" .SetTagName ("OUTLETTEMP.Value") .BackgroundColor = -1 .FillColor = 65280 .Orientation = 1 .Height = 539 .Left = -14797 .Lower = 0 .LineColor = 0 .ShowScales = False .Start = 0 .Top = 14000 .Upper = 100 .Width = 101 End With End Sub