Here try this
What you need to do is paste this into the workbook module. The way it keeps track of the number of opens is a cell in a worksheet, everytime its opened it adds one to that number.
The cell is currently sheet1 A1 change it to whatever you want. Ihe password is set to
yourpassword
change to whatever you want.
Its set to 50 opens and at 50 if the passwords incorrect the workbook will close automatically.
Hope this helps let me now if you need more help
steve w
Private Sub Workbook_Open()
a = Sheet1.Range("a1") ' The cell that keeps track of opens
a = a + 1
Sheet1.Range("a1") = a
If a >= 50 Then 'Number of times workbook is opened
Msg = "Enter Password"
ValidEntry = False
UserEntry = InputBox(Msg)
If UserEntry = "yourpassword" Then 'the yourpassword is password
Sheet1.Range("a1") = ""
ValidEntry = True
Else
MsgBox "Your password was incorrect."
Application.DisplayAlerts = False
ActiveWorkbook.Close 'closes worbook if false
Exit Sub
End If
End If
End Sub