LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
timg
 
Posts: n/a
Default Default Cell Values & Save Changes Dialog Box

Works well, thanks tra
--
Regards, timg.


"tra" wrote:

Put the following code into the ThisWorkbook object in the Visual Basic
Editor:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Saved = True
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Cancel = True
End Sub

The first Sub prevents the "Do you want to save changes?" dialog box
from showing when the workbook is closed
The second Sub prevents the user from saving any changes.

Note, however, that if the user opens the workbook without enabling
macros, then they will get the "Do you want to save changes?" dialog
box and they will be able to save it.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to take a cell that has 3 values and make 2 more new lines Phil Excel Worksheet Functions 4 October 23rd 05 10:53 PM
How to change drop down values based on another cell value? puneetarora_12 Excel Discussion (Misc queries) 3 October 5th 05 11:28 AM
VLookup to sum cell values Zakynthos Excel Worksheet Functions 4 July 26th 05 12:05 PM
Save as Default folder Gerry Cornell Excel Discussion (Misc queries) 2 December 13th 04 06:41 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"