I have code in the workbook_Open event that checks the file name has not been change. Before applying XLS Padlock, the code works as expected. How can I apply this code to ensure it checks the file name has not been change?
Thank you kindly.
FNname = Split(ThisWorkbook.Name, “.”)(0)
If FNname <> “My Workbook” Then
MsgBox “Access Denied! Unauthorize name change detected. My Workbook is a copyrighted application.”, vbCritical
tFlg = True
With Application
.DisplayAlerts = False
.Quit
End With: Exit Sub
End If