Hi all,
I'm a relative VBA newbie.
My problem is as follows:
I have deined in a standard module a public constant that serves as a password, I.e. i have
Public const PASSWORD = "abc123", for example.

Now, on protecting/unproecting a sheet from the ThisWorkbook module, I am unable to use this PASSWORD global constant.
I.e., the following fails

Sheets("Sheet1").Unprotect PASSWORD:=PASSWORD

I am certain that Sheet1 is protected by "abc123". If i replace the above with:

Sheets("Sheet1").Unprotect PASSWORD:="abc123"

everything works fine.

Hope that's clear, let me know if not. Thanks for any help anyone can offer.