T
thiaga
I am trying to protect to 2 worksheets upon work book open
Code:
Private Sub Workbook_Open()
Password = "1234"
Sheets("MasterData").Visible = xlSheetVeryHidden
Sheets("MasterData").Protect Password, True, True, True
Sheets("Unassigned Requests").Protect Password, True, True, True
End Sub
This works fine and it protects the sheets.
But
1. It protects the workbook also. When i open the excel it asks for a
password, which i dont require and i am not able to remove it
2. When I supply the same password in the excel (Tools > Protection >
UnProtect), it does not work.
Code:
Private Sub Workbook_Open()
Password = "1234"
Sheets("MasterData").Visible = xlSheetVeryHidden
Sheets("MasterData").Protect Password, True, True, True
Sheets("Unassigned Requests").Protect Password, True, True, True
End Sub
This works fine and it protects the sheets.
But
1. It protects the workbook also. When i open the excel it asks for a
password, which i dont require and i am not able to remove it
2. When I supply the same password in the excel (Tools > Protection >
UnProtect), it does not work.