.
As one of my instructors used to say "The only dumb question is the one not asked." Of course, my classmates still had a knack of making you feel inferior when you asked a question.
Anyway .. paste the macro into a ROUTINE MODULE.
Then if you want to manually access the password request, paste a CommandButton on the worksheet of your choice and attach it to the macro.
If you want the password request to display as soon as you open the workbook, you can add a small macro in the ThisWorkbook module to accomplish that.
If you'll download the sample file I created for your review, open the VBE and look at the code in the ROUTINE MODULE and in the ThisWorkbook module ... you can see what I'm referring to.
The macro in the ThisWorkbook module looks like this :
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call hideSheetsAgn
End Sub
Private Sub Workbook_Open()
'Call ShowSheets
End Sub
Notice the line " Call ShowSheets " is commented out. As it is now, when you open the workbook you'll have to click the button to see the Password Request notice.
If you un-comment out the line, when you open the workbook the Password Request will automatically show.
Play around with it ... it won't break. See how things work. You can always download it again.