Sub for Document_BeforeSave not working

Started by litchick10, November 28, 2017, 08:16:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

litchick10

I've created the following Sub in Visio but when I hit the save icon or use the file-->save option, no message box is popping up.

Private Sub Document_BeforeSave(ByVal doc As IVDocument)
MsgBox ("Hello World")
End Sub

When I try to do a test run the macros window pops up and asks me to choose a macro. I cannot figure out what I'm doing wrong. Any assistance would be appreciated. I've tried running from modules and the ThisDocument code

I am running Visio 2013 Professional using .vsdm file type. I have Enabled Content and Trusted the document. 

Yacine

Is the sub in the ThisDocument module or did you create a new one?
Yacine