If you want to secure your file to make sure that only you can open it, then you can add the below code in Workbook_Open function in your Excel file.
Note : Make sure you enter some thoughtful condition to make sure that only you open the file referring the code below.
Private Sub Workbook_Open()
If Environ("username") <> "mm" Then ThisWorkbook.Close False
End Sub
No comments:
Post a Comment