Autodesk AutoCAD Services & Support

Embed/Extract VBA project does not work as expected

Issue

You 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.

Solution

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:

  1. On the Tools menu, click Macro > VBA Manager.
  2. 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.
  3. Click Embed.
  4. Click Close to close the VBA Manager.
  5. 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.


Support – Terms of Use
  • Did this page resolve your issue?
  • Translate This Page (Beta)

    Learn More about this translation beta.Page is machine translated. Learn More.

    Was this translation useful?

  • Document Information

    Published date: 2005-Mar-14
    ID: TS22694

     

    Applies to:
    AutoCAD® 2007
    AutoCAD® 2006
    AutoCAD® 2005
    AutoCAD® 2004
    AutoCAD® 2002
    AutoCAD® 2000i
    AutoCAD® 2000