XL98: Macro to Save the Personal Macro Workbook Without Prompt
ID: Q189983
|
The information in this article applies to:
-
Microsoft Excel 98 Macintosh Edition
SUMMARY
When you edit the Personal Macro Workbook in Microsoft Excel 98 Macintosh
Edition, you are prompted to save changes when you quit the program.
This article describes how to create a macro that will suppress the dialog
box and will automatically save the changes to the Personal Macro Workbook
when you close the file.
MORE INFORMATION
The Personal Macro Workbook in Microsoft Excel is used to store custom
macros. This workbook is located in the Microsoft Office
98:Office:Startup:Excel folder.
Microsoft 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 professionals 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/overview/overview.asp
To automatically save the Personal Macro Workbook
when you quit Microsoft Excel, follow these steps:
- On the Tools menu, point to Macro, and then click Visual Basic Editor.
- Press COMMAND+R to activate the Project Explorer window.
- In the Project Explorer window, click the VBAProject (Personal Macro
Workbook) item.
- On the Insert menu, click Module.
- In the module, type the following code:
Sub Auto_Close()
ThisWorkbook.Save
End Sub
- On the File menu, click "Close And Return To Microsoft Excel."
- On the File menu, click Quit.
You will not be prompted to save the Personal Macro Workbook when you quit
Microsoft Excel, but your changes to the workbook will be saved.
When you open Microsoft Excel, the Personal Macro Workbook opens
automatically, but it is hidden. If you record a macro into the Personal
Macro Workbook or edit a macro in the Personal Macro Workbook, you will be
prompted to save your changes to the workbook when you quit Microsoft
Excel.
NOTE: Hiding and unhiding the workbook is considered a change, and
you will be prompted to save changes when you quit Microsoft Excel.
Additional query words:
XL98
Keywords : kbprg kbdta kbdtacode xlvbahowto
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbhowto
|