CALLTHIS

K

keith.x.kane

I'm stumped, am trying to use the code written in my stencil by other
pages.
In my eventdrop I have CALLTHIS("ThisDocument.main",) which works as
expected:
Public WithEvents vshape As Shape
:
:
Public Sub main(vshape As Visio.Shape)
in the current page, but I cannot call it from another.
I don't want 6 versions of the code floating about.

but using various combinations of "projectname" as in

CALLTHIS("ThisDocument.main","demostencil",)
or
CALLTHIS("ThisDocument.main","demostencil.vss",)
or
stuff it into a module:
CALLTHIS("NewModule.ThisDocument.main","demostencil",)
or using the full pathname
etc, etc.

don't work

can you give me an example
I can't find a compiler to create an exe.
 
D

David Parker

ThisDocument is a Class not a Module
Put your code into a Module, and then call it
 
K

keith.x.kane

On Feb 12, 12:26 pm, "David Parker" <[email protected]> responded:

Thanks, David. May the All-Mighty bless you!
That was what I was looking for.
Now for the Nu-bees, this works, I may have extra steps:
1. Move your code into a module
2. In your eventdrop cell put:
CALLTHIS"demo.Module1.dropRoutine",)
3. On the user page, add Applications Extensibility to the references
4. In references again, choose browse and find your stencil (.vss)
file
From then on you can save the new version to that old name,
And everyone has the same updated version.
 

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