Menu not working

K

Krzysztof

Hi,

I have created a form with vba script serving it. I'd like this form to be shown
from right-click menu. I right-clicked on the page and clicked Show ShapeSheet. I
added Action section and placed in Action: =RUNADDON("MyForm.Show") and in Menu:
"Show form". Now, if I right-click on the visio page, I can see that menu item, but
when I click it nothing happens. I tried placing simple code in Action like
=RUNADDON("MsgBox ""Hello""") but it also didn't work. Any ideas why? TIA.

regards,
Krzysztof
 
G

GMorris

Right off, it sounds like you don't have VBA enabled in the developer
settings...

But that might not be it?
 
R

Russ McKenna

Visio 2002 has limited what you can do with Runaddon - prevents viruises and
such. So msgbox will not work.
Try this
CallThis("ThisDocument.MyProc")
or
CallThis("ThatDocument.ThatProc","ThisDocument")

To be callable, MyProc needs to have a shape argument
Sub MyProc (AShape as Shape)
'stuff
End Sub

if you need more arguments

Sub MyProc (AShape as Shape, IntArg as integer, StrArg as string)
'stuff
End Sub

use CallThis("ThisDocument.MyProc", ,1,"string")
 

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