Try the below code. It ran successfully for me
Thanks,
Samir
Code:
Dim str
Const LETTERS = "abcdefghijklmnopqrstuvwxyz0123456789"
strLen=len(LETTERS)
For i = 1 to strLen
str = str & Mid( LETTERS, RandomNumber( 1, Len( LETTERS ) ), 1 )
Next
RandomString = str
msgbox str
Thanks,
Samir