Thanks picster. It works very reliable, especially in my case where the value does not change too quickly.

Ioannis