一个简单生成随机数程序
Public Function GetRndCode(maxLen)
Dim strNewPasswhatsNextupperlowerintCounter
Randomize
For intCounter = To maxLen
whatsNext = Int(( + ) * Rnd + )
If whatsNext = Then
upper =
lower =
Else
upper =
lower =
End If
strNewPass = strNewPass & Chr(Int((upper lower + ) * Rnd + lower))
Next
GetRndCode = strNewPass
End Function
使用方法
code =GetRndCode()