Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Execute warning on close if cell unchanged?
I can't seem to find the answer I need elsewhere, so here goes :) : How can I create a macro that executes a message before file is close (and before prompt to save changes) that warns a particular cell ha not been changed/edited since opening the file - with option t continue close and save changes OR cancel close and edit the cell? This is basically because the file is a quote and the status of th order must be updated every time the file is changed/opened; ie. Y or must be entered in the cell to notify if it has been processed to a order or not. The warning serves the purpose that each time the file is opened t check/edit details, this particular detail is not forgotten to b updated, as our warehouse will check to see if they are awaiting a order or not, so as not to have it arrive unexpected the next day! Any ideas? Many thanks Ale -- alex386 ----------------------------------------------------------------------- alex3867's Profile: http://www.excelforum.com/member.php...fo&userid=3722 View this thread: http://www.excelforum.com/showthread.php?threadid=57038 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Execute warning on close if cell unchanged?
somthing like:
Private Sub Workbook_Open() Sheets(1).Cells(30, 1) = Sheets(1).Cells(1, 1) End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) If Sheets(1).Cells(1, 1) = Sheets(1).Cells(30, 1) Then Svar = MsgBox("No changes,- Still wana close....? ", vbYesNo, "") If Svar = vbYes Then ThisWorkbook.Save Application.Quit Else Cancel = True End If End If End Sub cells(1,1) change to the cell u wana test cells(30,1) change to f.x. cells(65000,1) out of sight somwhere |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
execute macro; save it and close using Application.OnTime | Excel Programming | |||
Execute warning message | Excel Programming | |||
Warning message on file close | Excel Worksheet Functions | |||
Leave the Cell unchanged | Excel Programming | |||
Wav Warning Upon Attempt to Close Userform | Excel Programming |