I'm having many objects in PI-PB defined with multistate condition and I'm adding the number of each state in a counter so I can use this counter variable in another display. Whenever the values changes the state will also change, and number will be stored in variables. So to refresh I need to go to display1 code refresh it to see the update in display2 where I need this action to be updated automatically.
In display1 code I have to press f8 through the code to update (Application.Refresh didn't work too) .
I tried to use a=DoEvents line in my script (at the beginning and at the end of the code) as Robert Zomborszki and Patrice Thivierge suggested in Values refresh after context change with VBA but still not refreshing. Maybe I'm not using it properly! Any suggestions please?