Embed/Extract VBA project does not work as expected
IssueYou can embed a Visual Basic for Applications (VBA) project in a drawing. However, it is possible that a project is loaded in memory, when it seems to be embedded in the drawing. You probably will not notice that the project is not embedded in the drawing, unless you unload the project, or pass the drawing to a colleague who finds that the project is missing.
A common mistake that can lead to this situation is that you do not save the drawing after embedding the project. Use the following procedure to embed a VBA project in a drawing:
- On the Tools menu, click Macro > VBA Manager.
- In the VBA Manager, select the VBA project that you want to embed in the drawing. If no project is loaded, click Load to load one.
- Click Embed.
- Click Close to close the VBA Manager.
- Save the drawing.
Important: You must save the drawing to complete the embedding process.
To extract (remove) an embedded project from a drawing, complete the same procedure, but in step 3, click Extract instead of Embed.