There should be a way if 0 is a and 1 is b etc to use Chr and save yourself a buttload of time. Long case statements are slow as frozen molasses running uphill on Jupiter, if you know what I mean.
Printable View
There should be a way if 0 is a and 1 is b etc to use Chr and save yourself a buttload of time. Long case statements are slow as frozen molasses running uphill on Jupiter, if you know what I mean.
- put all the names into an array
- get a random number from the array's lower bound to the array's upper bound
unless i'm reading your post wrong, that should work
and it should save you a lot of time (and code)
I don't know how much work that would save, based on what I understand of the post. But I am wrong a lot, I'm just human. Try:
Dim I As integer, Name As String
Input #x, Name
For I = 1 to len(Name)
Mid(Name,I,1) = Chr(Val(Mid(Name, I, 1) + Asc("a"))
Next I
This will convert numbers to names, with a=0,b=1,etc