Hi all,
I'm trying to change the colour of some text based on whether an input the user has typed is between two (min and max) values. I have a numeric entry field, and once a valid value is present, the text will go from red to green.
For example, let's say the min and max values are 50 and 100. Initially, the value of the numeric display is 0, so the text is red. The operator types "7" - still red. The operator types "5" - the value in the entry field is now 75, so the text goes green. The operator types "0" - the value is now 750, so the text goes back to red.
As the numeric entry field doesn't actually send the value to the tag until you download it, I can't just monitor the value connection of the numeric entry object. I figure I'll probably have to do something with VBA - when the value changes, check it against the two relevant tags - but I can't figure out how to address the real-time value of my numeric entry field.
Any ideas?
I'm trying to change the colour of some text based on whether an input the user has typed is between two (min and max) values. I have a numeric entry field, and once a valid value is present, the text will go from red to green.
For example, let's say the min and max values are 50 and 100. Initially, the value of the numeric display is 0, so the text is red. The operator types "7" - still red. The operator types "5" - the value in the entry field is now 75, so the text goes green. The operator types "0" - the value is now 750, so the text goes back to red.
As the numeric entry field doesn't actually send the value to the tag until you download it, I can't just monitor the value connection of the numeric entry object. I figure I'll probably have to do something with VBA - when the value changes, check it against the two relevant tags - but I can't figure out how to address the real-time value of my numeric entry field.
Any ideas?