sachincool786
Member
Ohkk...Should it be like this
Public WithEvents oGroup As TagGroup
Private Sub Display_BeforeAnimationStart()
On Error Resume Next
Err.Clear
If oGroup Is Nothing Then
Set oGroup = Application.CreateTagGroup(Me.AreaName, 500)
If Err.Number Then
LogDiagnosticsMessage "Error creating TagGroup. Error: " _
& Err.Description, ftDiagSeverityError
Exit Sub
End If
oGroup.Add "System\Second"
oGroup.Add "System\Minute"
oGroup.Add "Heating_AutFF_SCADA"
oGroup.Active = True
End If
End Sub
Private Sub EventTriggerTags_Change(ByVal TagNames As IGOMStringList)
On Error Resume Next
Dim oTag As Tag
If Not oGroup Is Nothing Then
Set oTag = oGroup.Item("Heating_AutFF_SCADA")
Err.Clear
End If
If oTag.Value = 1 Then
ShowDisplay ("Heating_Off")
End If
End Sub
Public WithEvents oGroup As TagGroup
Private Sub Display_BeforeAnimationStart()
On Error Resume Next
Err.Clear
If oGroup Is Nothing Then
Set oGroup = Application.CreateTagGroup(Me.AreaName, 500)
If Err.Number Then
LogDiagnosticsMessage "Error creating TagGroup. Error: " _
& Err.Description, ftDiagSeverityError
Exit Sub
End If
oGroup.Add "System\Second"
oGroup.Add "System\Minute"
oGroup.Add "Heating_AutFF_SCADA"
oGroup.Active = True
End If
End Sub
Private Sub EventTriggerTags_Change(ByVal TagNames As IGOMStringList)
On Error Resume Next
Dim oTag As Tag
If Not oGroup Is Nothing Then
Set oTag = oGroup.Item("Heating_AutFF_SCADA")
Err.Clear
End If
If oTag.Value = 1 Then
ShowDisplay ("Heating_Off")
End If
End Sub