Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Adam,
You could use the BeforeSave and BeforeClose events of ThisWorkbook, e.g.: Private Sub Workbook_BeforeClose(Cancel As Boolean) Cancel = (Me.Sheets(1).Cells(1, 1) = _ Me.Sheets(2).Cells(1, 1)) End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _ Cancel As Boolean) Cancel = (Me.Sheets(1).Cells(1, 1) = _ Me.Sheets(2).Cells(1, 1)) End Sub Regards, KL "Adam Harding" wrote in message ... Am using Excel 2003. Want to stop users exiting or saving my spreadsheet unless the total on one sheet = total on other sheet. How can this be done? Any help gratefully received |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving and closing | Setting up and Configuration of Excel | |||
Saving and Closing | Excel Worksheet Functions | |||
Saving and Closing | Excel Discussion (Misc queries) | |||
closing & saving | Excel Worksheet Functions | |||
VBA - closing without saving changes | Excel Programming |