MortenB
Member
Hi
I'm trying to do the simplest of readings. Read a memorytag in VBA and then show a display if the tag is set.
However I get an errormessage in my code. The error is "Run-time error '424': Object required.
My code is:
The error points to the line:
I'm pretty new to both FTView and VBA.
Running FTView 7 by the way.
I'm trying to do the simplest of readings. Read a memorytag in VBA and then show a display if the tag is set.
However I get an errormessage in my code. The error is "Run-time error '424': Object required.
My code is:
Code:
Public Sub NumericDisplay1_Change()
Dim MyTag As Tag
Dim MyTagValue As Variant
Dim Tagname As String
Tagname = "MES_Tags\P_Avd\Slurryanlegg\NyReseptMottatt"
Set MyTag = gTagDb.GetTag(Tagname)
MyTagValue = MyTag.Value
Set MyTag = Nothing
If MyTagValue = 1 Then
ShowDisplay ("popup_slurryresept_P_anlegg")
End If
End Sub
The error points to the line:
Code:
Set MyTag = gTagDb.GetTag(Tagname)
I'm pretty new to both FTView and VBA.
Running FTView 7 by the way.