XL: Macro to Automatically Save Personal.xls Without PromptLast reviewed: December 1, 1997Article ID: Q153893 |
The information in this article applies to:
SUMMARYWhen you edit the Personal.xls file in Microsoft Excel for Windows (or the Personal Macro Workbook in Microsoft Excel for the Macintosh), you are asked to save changes to it when you exit Microsoft Excel. This article describes how to create a macro that will prevent the message from appearing and that will save the changes automatically when you close the file. For information on the purpose and location of this file, see the "Background" section at the end of this article.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/default.aspUse one of the following methods to automatically save the macro file when you quit Microsoft Excel:
Microsoft Excel 97 for Windows
Microsoft Excel 5.0 and 7.0 for Windows
Microsoft Excel 5.0 for the Macintosh
BACKGROUNDThe Personal.xls file in Microsoft Excel for Windows and the Personal Macro Workbook in Microsoft Excel for the Macintosh are used to store custom macros. In Microsoft Excel for Windows, the Personal.xls file normally resides in the \Excel\Xlstart folder. In Microsoft Excel for the Macintosh, the Personal Macro Workbook normally resides in the "System Folder:Preferences: Excel Startup Folder(5)" folder. When you open Microsoft Excel, the Personal macro Workbook opens automatically but is hidden. If you record a new macro and specify that the macro be recorded into the Personal.xls or Personal Macro Workbook, or if you edit it in any way, you will be prompted to save it when you quit Microsoft Excel. Simply unhiding workbook and then rehiding it counts as a change, and you will be prompted to save changes when you quit Microsoft Excel.
REFERENCES"Microsoft Excel Visual Basic Programmer's Guide," pages 205-210 "Visual Basic User's Guide," version 5.0, Chapter 13, Creating Automatic Procedures and Add-in Applications For more information about Auto_Close macros, click the Index tab in Microsoft Excel Help, and type the following text:
auto_close |
Additional query words: 5.00 5.00a 5.00c 7.00 7.00a 97 8.00 xl97
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |