Hi,

Upon opening my workbook I am trying to make it become password protected, however this will only be applicable after a specific date (10/09/2021). i currently have the following code but it is displaying syntax errors:

PHP Code: 
Private Sub Workbook_Open()
Dim d1 As Date
Dim d2 
As Date
Dim password 
As String
d1 
10 2021
d2 
Date
If d2 d1 Then
password 
InputBox (“enter password”)
Else
MsgBox (“Opening file”)
End If
If 
password “abC123_ Then
MsgBox 
(“Welcome!)
Else
MsgBox (“Incorrect password!)
password InputBox(“enter password again”)
End If
End Sub 
Any help would be much appreciated.

Thanks