The "[" character is ASCII code 91, so you're overshooting your intended range by 1. This is because the CInt function rounds to get an integer value, so it can round the result of Rnd() * 26 up to 26, which you don't want.
Try using:
As for the randomize function - generating random numbers is very tricky for a computer, so what the Rnd function gives you is the next number in a mathematical sequence defined by some complex formula. The initial value that is fed into this formula (the seed) can be set using the Randomize function, and using the timer function (which returns fractional number of seconds that have elapsed since midnight) makes it unlikely that the seed will be set to the same value every time the code is run.
Normally you'd just call randomize at the start of a function or sub using Rnd, but if you'd like to call it more often then that's up to you.
Bookmarks