Further to Les' response, you may want to do a READVALUE to test if the value is correct before the WRITEVALUE.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's