Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I set the worksheet to save before closing?
When there is a change in a worksheet and I try to close it, a message asks
me whether I want to save the worksheet or not? How do I turn on this notification before closing the sheet? |
#2
|
|||
|
|||
Open your workbook. Hit Alt+F11 or Tools--Macro--Visual basic editor
(VBE). On the left, double-click ThisWorkbook. Paste the following code into the ThisWorkbook code window. Hit the Save diskette at top-left. Close the VBE. Make a change to the workbook, and close it to test. Was the change saved? Should be. :) Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Save End Sub ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "kodaco" wrote in message ... When there is a change in a worksheet and I try to close it, a message asks me whether I want to save the worksheet or not? How do I turn on this notification before closing the sheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I create a button to save one worksheet into a new workshe | Excel Discussion (Misc queries) | |||
How do I save a filtered subset of a worksheet? | Excel Discussion (Misc queries) | |||
How to save worksheet in .cvs format? | Excel Discussion (Misc queries) | |||
how do i create and save a new file or worksheet autmatically ever | Excel Discussion (Misc queries) | |||
Save? prompt when closing Excel | Excel Discussion (Misc queries) |