|
|
|
Click here to copy the following block |
Function RandomString(ByVal mask As String) As String Dim i As Integer Dim acode As Integer Dim options As String Dim char As String RandomString = mask For i = 1 To Len(mask) char = Mid$(mask, i, 1) Select Case char Case "?" char = Chr$(1 + Rnd * 127) options = "" Case "#" options = "0123456789" Case "A" options = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" Case "N" options = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0" _ & "123456789" Case "H" options = "0123456789ABCDEF" Case Else options = "" End Select If Len(options) Then char = Mid$(options & Right$(options, 1), 1 + Int(Rnd * Len(options) _ ), 1) End If Mid(RandomString, i, 1) = char Next
End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|