Couple problems with that code soulman. The RND command picks a random integer up to your argument, INCLUDING zero. Also, your counter goes from 0 to 16, INCLUDING zero, which means it would have 17 characters.
These lines:
IF LETTERORNUMBER = 1
OUTPUT$ = OUTPUT$ + MID$(ALPHABET$,RND(LEN(ALPHABET$)))
ELSE
OUTPUT$ = OUTPUT$ + MID$(NUMBER$,RND(LEN(NUMBER$)))
ENDIF
therefore do not always add a character to OUTPUT$. If the rnd command returns a zero, the string returned from mid$ is "", because the indexes go from 1 to length.
To generate a random string always containing 16 character, randomly chosen from those to strings, the code would look like this:
start:
ALPHABET$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
NUMBER$="1234567890"
FOR COUNTER = 0 TO 15
LETTERORNUMBER = rnd(1)
IF LETTERORNUMBER = 0
OUTPUT$ = OUTPUT$ + MID$(ALPHABET$,RND(LEN(ALPHABET$)-1)+1)
ELSE
OUTPUT$ = OUTPUT$ + MID$(NUMBER$,RND(LEN(NUMBER$)-1)+1)
ENDIF
NEXT COUNTER
PRINT OUTPUT$+" : "+str$(len(output$))
output$=""
WAIT KEY
goto start