Thanks for the modification suggestion

Have tried the code as you have it posted

First issue was a compile error on this line
Code:
 b0 = b0*10+_myvar     ' add in the new number
So I changed it to read
Code:
 b0 = b0*10+myvar     ' add in the new number
and it compiled.

The resultant output in MCS serial tool each time on any keypress is 15 ??

At the moment I'm scanning through to see what else you modified and where the issue lies, will feedback if and when I find the problem :-)

Kind regards
Dennis