Been many days since I visited the forum let alone troll. Its been great help for me. Ok, here goes my query.

I am working on building an Excel Sheet which imports *.txt, *.RES files for a colleague in another department. He wanted the program to have a control (fixed number of attempts) but then being the myopic guy I am I did not consider the renewal option. To achieve that I created a userform to provide username and password. And here the problems began with the code below:

[VBA]Private Sub PassWord_AfterUpdate()
Dim OldName, NewName As String
Dim FSO As Object
OldName = "C:\Documents and Settings\All Users\Application Data\FlareLog\UsageLog.txt"
NewName = Left(OldName, 70) & "_" & Date & ".txt"
If LogIn.Value = "Admin" And PassWord.Value = "Sachin" Then
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.MoveFile OldName, NewName
Set FSO = Nothing
MsgBox "Subscription Renewed!"
Unload Me
Else
MsgBox "You do not have sufficient privileges!"
Unload Me
End If
End Sub[/VBA]

The error comes specifically at FSO.MoveFile OldName, NewName.

I am attaching herewith, the Excel file. Awaiting your kind feedback.