Microsoft KB Archive/104358

From BetaArchive Wiki


Excel: Errors Using SWITCH.XLA Buttons to Start Applications

Last reviewed: September 12, 1996
Article ID: Q104358

The information in this article applies to:

  • Microsoft Excel for Windows, versions 4.0, 4.0a

SYMPTOMS

When you run an application from a button installed with the SWITCH.XLA add-in macro, you may receive the following error messages:

   Cannot find Microsoft Word directory in MS-DOS PATH= statement.
   Check AUTOEXEC.BAT making sure the Microsoft Word is in the PATH=
   statement.

   Cannot find Microsoft Project directory in MS-DOS PATH= statement.
   Check AUTOEXEC.BAT making sure the Microsoft Project is in the
   PATH= statement.

   Cannot find Microsoft PowerPoint directory in MS-DOS PATH= statement.
   Check AUTOEXEC.BAT making sure the Microsoft PowerPoint is in the
   PATH= statement.

CAUSE

The above errors are caused by an incorrect [Extensions] setting in your WIN.INI file (the path to Word, PowerPoint, or Microsoft Project may be incorrect).

WORKAROUND

To work around this problem:

  1. Open your WIN.INI file in a text editor (such as Notepad).
  2. Locate the [Extensions] section of the WIN.INI file.
  3. Verify that the paths for Word, PowerPoint, and Microsoft Project are all entered correctly.

    For example, this section of your WIN.INI might resemble the following:

    [Extensions]

    doc=C:\WINWORD\WINWORD.EXE ^.doc mpp=C:\WINPROJ\WINPROJ.EXE ^.mpp ppt=C:\POWERPNT\POWERPNT.EXE ^.ppt

  4. Save any changes.

MORE INFORMATION

The SWITCH.XLA add-in macro adds the toolbar buttons to the toolbar and assigns a macro to each of them which points to the SWITCHTO.XLA macro sheet. These macros are then executed whenever the toolbar buttons are selected. However, the macro code does not rely on the PATH statement to launch the application (as the error messages indicate). Instead, the macro uses DDE calls to the Windows kernel to return the path of the application. These calls to the kernel use the file association information found in the WIN.INI file under the [Extensions] section.

REFERENCES

"User's Guide 2", version 4.0, page 182


KBCategory: kbusage

KBSubcategory:

Additional reference words: 4.00 4.00a network



Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.