In Microsoft Visio 2002, when you have a Visio drawing open and then you try to start Visual Basic Editor (on the Tools
menu, point to Macros
, and then click Visual Basic Editor
), you receive the following error message:
Visio failed to initialize VBA. You can continue running Visio.
Choose OK to continue.
When this behavior occurs, the Visual Basic Editor stops responding. Visual Basic Editor is no longer displayed.
This behavior may be caused by a conflicting program that was running in the
background when you installed Visio 2002.
To resolve this behavior, follow these steps:
- Quit all background programs that are running, especially antivirus programs.
- Start Visio 2002.
- On the Help menu, click Detect and Repair.
- Click to select the Discard my customized settings and restore default settings check box, and then click OK.
- After the detect and repair process is complete, restart your computer.
- Start Visio with the /r switch. To do so, follow these steps:
- Click Start, and then click Run.
- Click Browse.
- Locate the Visio.exe file, and then click the Visio.exe file. By default, the Visio.exe file is located in the following folder:
C:\Program Files\Microsoft Office\Visio10
- Click Open.
Note Make sure that the path in the Open box is enclosed in quotation marks.
- In the Open box, put the insertion point at the end of the path statement (to the right of the closing quotation mark).
- Type a space, followed by the /r switch. The command looks similar to the following:
"C:\Program Files\Microsoft Office\Visio10\Visio.exe" /r
- Click OK.
- Open any drawing, and then start Visual Basic Editor.
For additional information about Visio command-line switches, click the following article number to view the article in the Microsoft Knowledge Base:
Visio2002: Visio Startup (Command-Line) Switches and Their Purpose