Can't edit module

Modules marked as protected can be viewed, but not edited. This error has the following cause and solution:

  • You tried to edit a protected module. Remove the protection from the module, and then try editing again. In most cases, this error occurs because the Visual SourceSafe addin is installed and the file isn't checked out.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.