I've named the password to my protected workbook using this code:

ActiveWorkbook.Names.Add Name:="password", RefersTo:=pWord1

I then want to be able to close down Excel, switch off the computer, open all back up again and retrieve the password. I've tried the code:

pWord1 = Evaluate(ActiveWorkbook.Names("password").RefersTo)

But I get this:

Run-time error '1004': Application-defined or object-defined error

Can anybody help me to retrieve the password from the named variable after closing?

This is to help me protect and unprotect the workbook whenever I open and close it to timestamp a spreadsheet in it. I don't want the daily user to be able to see the time stamped spreadsheet and so need to keep it hidden and the spreadsheet protected over the course of many days when I'm not round.

Many thanks,
Mark