YasserKhalil
Well-known Member
- Joined
- Jun 24, 2010
- Messages
- 852
I have this code which generates a string of letters and digits
The code do it in A1
I want to edit the code to include the range("A1:A10")
The code do it in A1
I want to edit the code to include the range("A1:A10")
Code:
Dim intCnt As Integer
Dim intChr As Integer
Dim strTemp As String
Randomize
For intCnt = 1 To 10
intChr = Int(Rnd() * (122 - 49)) + 49
If intChr > 57 And intChr < 97 Then
intCnt = intCnt - 1
Else
strTemp = strTemp & Chr(intChr)
End If
Next intCnt
Range("A1").Value = strTemp