Qbasicnews.com

Full Version: CHR$
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello this is part of my program i have used the menu list a couple of time throught the program

IF selection = 1 THEN CALL CONVGBP
IF selection = 2 THEN CALL AUDGBP
IF selection = 3 THEN CALL CADGBP
IF selection = 4 THEN CALL NZDGBP
IF selection = 5 THEN CALL USDGBP
IF selection = 6 THEN CALL EURGBP
IF selection = 7 THEN CALL ENDOFDAY
IF selection >= 8 THEN
ELSEIF selection <= 0 THEN

it all works fine what i would like help on please is on who do i display an error message if user accidently presses a letter key have been advised to use CHR$ but cant make it work
You could do.

dim selection as string

while selection = ""
selection = INKEY$
wend

IF selection = "1" THEN CALL CONVGBP
IF selection = "2" THEN CALL AUDGBP
IF selection = "3" THEN CALL CADGBP
IF selection = "4" THEN CALL NZDGBP
IF selection = "5" THEN CALL USDGBP
IF selection = "6" THEN CALL EURGBP
IF selection = "7" THEN CALL ENDOFDAY
IF selection >= "8" THEN
ELSEIF selection <= "0" THEN
Tghanks will let you know if it works it will take me ages to go throught the prpogram and change all the other menus
Big Grin
Thanks a lot it works a treat been going round in circles trying to work it out

Marvellous
Big Grin Big Grin