XL: Saving and Restoring Workspace SettingsID: Q99367
|
In Microsoft Excel, the GET.WORKSPACE() function returns information about
the workspace settings and can be used to determine if a certain workspace
setting is enabled or disabled. However, if you are running a macro that
changes the settings in the Workspace Options dialog box, and you would
like to restore the settings to their original values at the end of the
macro, using the GET.WORKSPACE() function is not the best method to use--
there is no argument in the GET.WORKSPACE() function that will test the
status of the Info Window, Note Indicator, or Command Underline (Macintosh
Only).
In Microsoft Excel version 4.0, you can use a workbook to restore the
original workspace settings. To restore all of the workspace settings,
create a workbook at the beginning of the macro, and then close the
workbook and reopen it at the end of the macro. In Microsoft Excel, version
3.0, use a workspace file.
Note that in Microsoft Excel version 5.0, in a Visual Basic macro, you can
store any view, edit or general settings (settings available in the Options
dialog box) at the beginning of your macro, and then restore the values at
the end of your macro.
When a workbook file is opened in Microsoft Excel version 4.0, the current
settings in the Workspace Options dialog box are replaced with the settings
saved in the workbook. Even though the workbook is then immediately closed,
the workspace settings remain. In Microsoft Excel version 3.0, these
settings are saved in a workspace file.
To restore the workspace settings after you run your macro, use the
appropriate procedure below.
"User's Guide", version 3.0, page 550
"User's Guide 1", version 4.0, pages 67-79
Additional query words: 4.00a
Keywords : kbenv
Version : WINDOWS:3.0,4.0,4.0a; OS/2:3.0; MACINTOSH:3.0,4.0
Platform : MACINTOSH OS/2 WINDOWS
Issue type :
Last Reviewed: April 5, 1999