Hello,
You can use this function:
And then do something like this:Code:Public Function GenerateStr() strInputString = txtInput.Text ' Change this textbox with your own intLength = Len(strInputString) intNameLength = Len(txtInput.Text) strName = "" For intStep = 1 To intNameLength intRnd = Int((intLength * Rnd) + 1) strName = strName & Mid$(strInputString, intRnd, 1) Next GenerateStr = strName End Function
This will workCode:Private Sub Command1_Click() txtOutput.Text = GenerateStr ' Change this textbox with your own "output textbox" End Sub
EDIT: You can add this function inside module if you want.






Reply With Quote