Hello... I need some help in finishing up with a macro that asks for a password when the file is opened after a certain dates. So if the dates in the computer is over the 15th day of the month, upon opening the spreadsheet it will ask for a password. Otherwise, it is okay. Thanks for all the help.
-----------------------------------------------------
Sub auto_open()
Dim MyDate
Dim SetDate
Dim CompareDate
MyDate = Format(Date, "mm/dd/yyyy")
CompareDate = Mid(MyDate, 1, 2) & "/" & "15" & "/" & Mid(MyDate, 7, 4)
If MyDate > CompareDate Then
ActiveWorkbook.Password = "test"
'MsgBox "Please Use a New Spreadsheet from the Server" & vbCrLf, vbOKOnly, "Outdated Spreadsheet"
Else
End If
End Sub
-----------------------------------------------------------------------------
Bookmarks