Protect a Macro with a Password

I'd like to have some macros that will execute (or can be edited) only after I enter a password. Is that possible?

For example, let's say I wanted to have a macro that would type my credit card number. When I trigger the macro, it would ask for a password first.

Macro Express on Windows had that, and I used it for some macros.


Hey Al,

You cannot encrypt a macro, but you can have a macro get encrypted data.

See this ⇢ Set Variable to Keychain Password

That's probably the most straightforward method, but I can think of 2-3 others off the top of my head.