Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

simple Password Generator in Excel

  Asked By: Lillian    Date: Mar 22    Category: MS Office    Views: 1421
  

I am creating a simple Password Generator in
Excel, did that fine now I want to add three rows. First was Date
Created, second was New Password third was Date used. Here is what I
have and if I thought about this right it should work but it's not.
Any help will be appreciated. Problem lies with how I am calling
results from other classes I believe but not sure.

Dim passNum As String
Dim passName As String
Dim password As String




Private Sub CommandButton1_Click()


Call createPassword
Call moveActiveDate
Call moveActivePW

End Sub

Sub moveActiveDate()
Worksheets("Password Generator").Activate
Range("G4").Select
ActiveCell.Offset(0, 1).Activate

If Cells(1, 1) = "" Then
Cells(1, 1).Select
ElseIf Cells(2, 1) = "" Then
Cells(2, 1).Select
Else
Cells(1, 1).End(xlDown)(2, 1).Select
End If

ActiveCell.Value = Today()


End Sub

Sub moveActivePW()
Worksheets("Password Generator").Activate
Range("H4").Select
ActiveCell.Offset(0, 1).Activate

If Cells(1, 1) = "" Then
Cells(1, 1).Select
ElseIf Cells(2, 1) = "" Then
Cells(2, 1).Select
Else
Cells(1, 1).End(xlDown)(2, 1).Select
End If

ActiveCell.Value = createPassword(password)


End Sub

Sub createPassword()
Randomize

passNum = CStr(Int(100000 + (Rnd * 900000)))
passName = "pcla"
password = passName + passNum

Worksheets("Password Generator").Range("E3").Value = password
End Sub

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on simple Password Generator in Excel Or get search suggestion and latest updates.




Tagged: