Dear Friends,
I have a spread sheet that won't do as I want it too. I do hope someone reading this can help me, the dead line is fast approaching.
What it is, a userform being used as a password input box to reset the spreadsheet ready for the next year. What I need it to do is to save the workbook as it is, then 'save as' a different name, then reopen the original spreadsheet. Most works, it just wont reopen the original spreadsheet. I think I have tried pretty much everything and I just cant make it work. It saves the spreadsheet, saves as, closes the workbook (keeps excel open) but then thats it. 
The code as it stands is as follows.
Private Sub continueres_Click()
If Passwordyear.password.Text = "Password1" Then
Passwordyear.password.Text = ""
Passwordyear.Hide
ActiveWorkbook.Save
Dim dt As String, wbNam As String
wbNam = "MMS_"
dt = Format(CStr(Now), "dd_mm_yyyy")
ActiveWorkbook.SaveAs FileName:=wbNam & dt
ThisWorkbook.Close
Application.Workbooks.Open ("Maintenance Management System (Draft - MPR) - Copy (Autosaved).xlsm")
Else
MsgBox "Incorect Password"
Passwordyear.Hide
End If
End Sub
Many thanks
Michael
Bookmarks