Runaddon() Problem/Question

C

Corey McCord

When using RunAddon("ThisDocument.A")

Sub A()

MsgBox "A"

End Sub

I have no problem but... Is there a way to call a sub from say an open
stencil.

I tried the same Sub A() code in a stencil and tried calling it with

RunAddon("StencilName.ThisDocument.A")

I get an 424 "Object Requried" Error.

Anyone know how I can do this or is it not possible.

Thanks,

Corey
 
J

junethesecond

Sub A() in the stencil not in the same
project as the project of current drawing,
so you should use CallThis function in
place of RunAddon. For example,
CALLTHIS("A()", "Project Name of Stencil")
Project name of stencil may be found in the
project explorer in the VBA editor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top