Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to take a cell that has 3 values and make 2 more new lines | Excel Worksheet Functions | |||
How to change drop down values based on another cell value? | Excel Discussion (Misc queries) | |||
VLookup to sum cell values | Excel Worksheet Functions | |||
Save as Default folder | Excel Discussion (Misc queries) | |||
GET.CELL | Excel Worksheet Functions |