Your code converts integer index values โโto strings. Note that your only reference to your constants is to take their length. You are returning indices, not characters.
You can fix your code by using integer indexes that you generate to refer to elements in string constants. Mason and Ken showed how to do this.
Personally, I would end the constants and write
Chr(ord('a') + Random(26))
and
Chr(ord('a') + Random(26))
and
Chr(ord('0') + Random(10))
The ordinal values โโof these characters were developed once again when allowing such a code.
David heffernan
source share