Microsoft KB Archive/254485

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


Visio5: A Visual Basic for Applications Error 21 Occurs When You Install Visio 5.0 on Windows NT 4.0

Article ID: 254485

Article Last Modified on 10/11/2006



APPLIES TO

  • Visio 5.0 Standard
  • Visio 5.0 Professional
  • Visio 5.0 Technical
  • Visio 5.0 Enterprise
  • Microsoft Windows NT 4.0



This article was previously published under Q254485

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry


SYMPTOMS

When you try to install Visio 5.0 on a computer running Microsoft Windows NT 4.0, you may experience a Visual Basic for Applications error 21 during the Visual Basic for Applications-initialization stage of the Visio installation.

RESOLUTION

To install Visual Basic for Applications properly, the Setup program needs to add or modify certain registry entries. If these entries do not have the correct ownership or permissions, you may receive the Visual Basic for Applications Error 21. Giving yourself ownership of and permissions for these entries solves the error.

NOTE: To change ownership and permissions in the Registry, you need to log on to Windows NT as the administrator, and then run the Windows NT Regedt32 program to edit the entries (or keys).

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Solving this error involves finding the registry keys that you need to modify, and then giving yourself ownership and permissions.

To find the proper keys in the registry:

  1. Restart Windows NT and log on to your local domain as the administrator.
  2. Click Start, click Run, type Regedt32.exe, and then click OK.


Registry Editor starts.

  1. In Registry Editor, click the title bar of the HKEY_LOCAL_MACHINE window to bring it to the front.
  2. In the HKEY_LOCAL_MACHINE window, double-click the SOFTWARE folder to open it and display its subfolders.
  3. Under SOFTWARE, double-click the Microsoft folder, and then the Shared Tools folder.


You should now see the list of subfolders under SOFTWARE\Microsoft\Shared Tools.

  1. To find the keys, scroll down to the folders (keys) that have names that start with "veen."

After you find the keys, you can give yourself ownership and assign yourself permissions.

To take ownership of the keys and assign permissions:

NOTE: Follow the steps in this procedure for each key with a name that starts with "veen," as well as its Clients subkey. The number of keys that start with "veen" varies on each system.

  1. If the key is unavailable (dimmed), select it, and then click Owner on the Security menu. The following message appears:

    You do not have permission to view the current owner but you may have permission to change it. Do you want to try overwriting the current owner?

  2. Click Yes in the message box.
  3. In the next message box that appears, click Take Ownership.
  4. On the Security menu, click Permissions, and then, in the Registry Key Permissions dialog box, click Add to add the selected key.
  5. Under Type Of Access, select Full Control, and then click OK.

After you follow these steps for each key, reinstall Visio 5.0 to ensure that Visual Basic for Applications is registered properly in the registry. When you reinstall Visio, the Visual Basic for Applications Error 21 should no longer occur.


Additional query words: prb

Keywords: kbdtacode KB254485