Thank you for all your remarks.
The END statement was there only for testing purpose; I'm going to remove it.
Yes, Pbtn=9 if no button is pressed.
Well Paul, I think you have found the problem.
Regarding the "IF xxxx THEN yyyy : zzzz", I thought that the "zzzz" would be executed ONLY when the IF statement is true. This is why I wrote it after each IF statement (didn't check this out now - will do this in a few minutes).
I'll come back asap.
Bookmarks