Access a Linked Variable on a Popup Screen

Access a Linked Variable on a Popup Screen

Hello,
I am using VBA to write a variable "showblocking" which is linked to the visibility property in a red button on a popup screen.
My popup has a tab selector, uses recipes and is called from two different places in my project, only one of this calls should be using this red button, the other should never show it.
The porpuse of the button is to block the users from clicking another element in the popup. (I am already using authorization level on the rest of the buttons, so this is extra safety).
I have 3 conditions to set that visibility variable "showblocking" to 1.
1 Popup should have been called from screen FS01 (i have a way to know it)
2 MUV.Permission bit is on (Bit comming from the PLC)
3 PW_TabSelected is equal to 3
Now, PW_Tab Selected is an internal variable aswell, but as it is used inside the popup i dont know if Zenon creates another instance (a copy of the variable) in orther to use it inside the popup, that way if i open one popup in the server and i open the same exact popup from the client the PW_TabSelected will be independant. (Which aparently works like that because there is no conflict between server and client using the same screen at the same time).
So what i want is to say something like this
If thisProject.DeviceName = "PT3P25_FS01" And thisProject.variables.Item("PW_TabSelected").Value = 3 Then
If thisProject.variables.Item("MUV.Permission").Value = 1 Then
thisProject.variables.Item("MUV.ShowBlocking_FS01").Value = 0
Else
thisProject.variables.Item("MUV.ShowBlocking_FS01").Value = 1
End If
Else
thisProject.variables.Item("MUV.ShowBlocking_FS01").Value = 0
End If
Now the thing is, this code is working but only in the server and the standby server. The red button will never show if i am in the client.
Hope you guys can help! Thanks

This is a migrated post! Originally posted on 22.09.2016 by user kikonio2. Please be aware that information can be outdated.