There is no way on the Mac you can protect/unprotect a VBA Project via a
macro.
But this doesn't mean there is a standard way to do it in Windows. In
Windows, a trick to do it is with SendKey: simulating keyboard inputs.
However, this is very unreliable and is not recommended.
If you want to unprotect your project every time you use it, you can set a
password manually, and then double-click the project in VBA Editor to unlock
it every time.
I work in an investment bank and I have VBA Projects which I need to unlock
every time I use them.
It's true that VBA password protection is weak, as the password is merely
saved in several bytes within an Excel file. Some people who know the secret
can simply hack into the file, and delete those bytes, and the password will
be removed completely. But such "secret" has been well maintained by people
in the industry for years, therefore, the password protection should still
be able to protect access from 99.9999999% of the population. No need to
worry too much. (Nothing is truly secure anyway...)
Regards,
Edwin Tam
http://www.vonixx.com/