XL: Saving and Restoring Workspace SettingsLast reviewed: February 2, 1998Article ID: Q99367 |
The information in this article applies to:
SUMMARYIn 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.
MORE INFORMATIONWhen 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.
In Microsoft Excel 4.0All of the settings in the Workspace Options dialog box are saved in a workbook file. Follow these steps in your macro (or do them manually):
In Microsoft Excel 3.0All of the settings in the Workspace Options dialog box are saved in a workspace file with the exception of the Alternate Menu choice, available in Microsoft Excel for Windows. To determine this setting, use GET.WORKSPACE(28) in your macro, which returns TRUE if Microsoft Menus are selected. Follow these general steps in your macro.
REFERENCES"User's Guide", version 3.0, page 550 "User's Guide 1", version 4.0, pages 67-79
|
Additional query words: 3.00 4.00 4.00a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |