VBA Macros not accesible

U

udo

hi,

maybe someone has an idea regarding this problem.

the following happened:

I wrote some code for visio (2007)
now, when I open the document in viso 2007 or 2003 the macros seemed to be
gone and the VBA editor does not start. I get the following error message
"The operation cannot be performed because VBA is not installed or could not
be initialized. You can continue running Visio."
if I close the "troube-doc" and open a new document, I can start the VBA
editor.
if I open the "problem-document" I don't see any new elements in the project
view... looks like a "ghost" project...

my questions now:
is the code lost or is there a way to recuperate it?
did somebody experience similar problems?

Thanks,

udo
 
U

udo

The problem was related to removing the title of the document (File ->
Properties -> Summary Tab -> Title). Once the title is removed, the VBA
enviroment can't be launched anymore. At lest not that I know how... Maybe
someone knows?!?!

Reentering a title does not fix the problem...

Is this considered a bug?

Thanks, udo
 
P

Paul Herber

The problem was related to removing the title of the document (File ->
Properties -> Summary Tab -> Title). Once the title is removed, the VBA
enviroment can't be launched anymore. At lest not that I know how... Maybe
someone knows?!?!

Reentering a title does not fix the problem...

Is this considered a bug?

Thanks, udo

I've just tried this, no problem with any macros.
What are your Visio macro security settings?
 
U

udo

I've just tried this, no problem with any macros.
What are your Visio macro security settings?

hi paul,

i tried with accept only signed macros and the lowest level (accept all
macros). still the same... btw. i have a digital signature for that
document...

udo
 
U

udo

After some analysis I found out that the problem is related to the Autosave
cycle on Vsio 2007. Doing the same procedure on Visio 2003 does not result in
VBA functuality loss and loss(!) of VBA code.


This is what I have done to reproduce the error.

Visio 2003:
Start a copy of the working file.
Execute the macro.
Wait for the Autosave cycle.
Close the file -> Message window appears and asks to save the file -> Yes
Restart the file. No Problems. Macros are working, VBA Environment is
accessible. :)

Visio 2007:
Start a copy of the working file.
Execute the macro.
Wait for the Autosave cycle.
Close the file -> Message window appears and asks to save the file -> Yes
Restart the file. BIG PROBLEMS! Macros are NOT working, VBA Environment is
NOT accessible. :(
ERROR MESSAGE when trying to execute macros or accessing VBA environment:
"The operation cannot be performed because VBA is not installed or could not
be initialized. You can continue running Visio."

Note (Visio 2007): If I save the file before the Autosave cycle, no
problems...

Note 2:
Maybe it is related to some of my macro operations which are interpreted
differently in Visio 2003 and 2007. Trying to reproduce this with a "Hello
World" macro does not cause any problems.

Help is highly appreciated! ;)

Thanks,

Udo
 
P

Paul Herber

After some analysis I found out that the problem is related to the Autosave
cycle on Vsio 2007. Doing the same procedure on Visio 2003 does not result in
VBA functuality loss and loss(!) of VBA code.

Your Visio 2007 default file save format, check that it is "Visio
Document", not an old format i.e. Visio 2002 format or the XML format.
Neither of these save digital signature information. That might cause
a problem
 

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