VBA error new drawing template

VBA error new drawing template

anilkumar279
Enthusiast Enthusiast
766 Views
3 Replies
Message 1 of 4

VBA error new drawing template

anilkumar279
Enthusiast
Enthusiast

Hello,

 

When ever I open a new idw template, non empty VBA error message recieved.Please suggest solutions for it. Check enclosed image.

 

Thank you,

0 Likes
767 Views
3 Replies
Replies (3)
Message 2 of 4

ruthsteed
Autodesk
Autodesk
Hi,

That message is warning you that there is executable code in your drawing template.

You can get rid of the warning by removing the VBA code from the template. To do this, open the drawing template using the open command (not the "new document" command). Go to the VBA environment (Tools>VBA Editor or <Alt><F11>). In the project browser, expand the Document project for the drawing document, double click on the "ThisDocument" entry and delete any content in the VBA code window for it. Right click on any other entries under the document project and select "Remove...". Resave your drawing to the templates folder.

This should get rid of the warning when you use that drawing as a template.


Ruth Steed
Inventor Development Team
Autodesk, Inc.

0 Likes
Message 3 of 4

anilkumar279
Enthusiast
Enthusiast

hi, I have 2 modules init & i don't want to delete them.There is nothing in "ThisDocument"

thank you

0 Likes
Message 4 of 4

ruthsteed
Autodesk
Autodesk

Hi,

You might consider moving the content of your modules and functions to your application project. Then they would be available no matter what documents are open. You can also suppress the message by using the "Prompt" button to expand the dialog and choose "Do not show this message again ever", but the reason for the message is that executable cod in a document can be a security risk (like a virus).

VBA_Warning.png

-Ruth



Ruth Steed
Inventor Development Team
Autodesk, Inc.

0 Likes