CoderByNature
Member
Hey, pretty new to VB scripting in FactoryTalk SE. I am attempting to make a global object that will update the header text to match what screen the HMI is currently displaying without having to go into each screen and write the code to make it work.
Ideally, I write the code once in my global object screen and it will update everywhere that header is so long as VB scripting is allowed on said display.
Not sure if any of this makes sense or if its even possible, just looking to code smarter not harder. Copy pasting code 500 times is much more painful than writing it once.
Heres what I have that works
Private Sub Display_AnimationStart()
PageTitleText.Caption = Replace(ThisDisplay.Name, "_", " ")
End Sub
Ideally, I write the code once in my global object screen and it will update everywhere that header is so long as VB scripting is allowed on said display.
Not sure if any of this makes sense or if its even possible, just looking to code smarter not harder. Copy pasting code 500 times is much more painful than writing it once.
Heres what I have that works
Private Sub Display_AnimationStart()
PageTitleText.Caption = Replace(ThisDisplay.Name, "_", " ")
End Sub