Ilias
I don't get what you're trying to do. Do you want to password protect the sheet with the main password whenever the file is closed? If so,
1) Open the workbook
2) Press Alt-F11 to open the Visual Basic Editor
3) In the window top left, double click ThisWorkbook
4) At the top of the main window on the right, there are 2 drop down lists. On the left, select 'Workbook' and on the right select 'Before Close'
5) In the 'Private Sub Workbook_BeforeClose(Cancel As Boolean)' section, paste the following code
'Change Sheet1 to the name of the sheet you want to protect and 'mainpassword' to....your main password.
Dion
Bookmarks