Let's take it step by step... Line 1 contains an IF statement that will probably never execute, since it would require the user immediately pressing the button on program start. I'd suggest removing it. Lines 2 and 17 show that you are using a GOTO loop. This is heavily discouraged since it leads to unclear code. Stick to loop structures like WHILE...WEND.