Trevor3007
Well-known Member
- Joined
- Jan 26, 2017
- Messages
- 675
- Office Version
- 365
- Platform
- Windows
Hello,
The code below generates random passwords, & then goes to a2 & a message box appears stating 'enter site site name:-
although it works to a point, there is the issue of 'speed it takes to complete & id rather have a input box to put the 'enter 'site name' rather then the 'message box'
can anyone help & sort for me please?
many thanks in advance & hope you have a great rest of your day to.
The code below generates random passwords, & then goes to a2 & a message box appears stating 'enter site site name:-
VBA Code:
Sub autocode()
Static IsRandomized As Boolean
Dim i As Integer, PW1 As String
Dim cell As Range, PW As String
If Not IsRandomized Then Randomize: IsRandomized = True
For Each cell In Range("c2:c2663")
PW = vbNullString
For i = 1 To 8
Do
DoEvents
PW1 = Chr(Int((96 - 123 + 1) * Rnd + 123)) ' Lower case alpha
Loop Until InStr(1, PW, PW1, 1) = 0
PW = PW & PW1
Next i
PW = Replace(PW, Mid(PW, Int(8 * Rnd + 1), 1), Int(8 * Rnd + 1))
cell.Value = PW
Next cell
Application.Goto Reference:="R2C1"
MsgBox "Enter Site Name"
End Sub
although it works to a point, there is the issue of 'speed it takes to complete & id rather have a input box to put the 'enter 'site name' rather then the 'message box'
can anyone help & sort for me please?
many thanks in advance & hope you have a great rest of your day to.