ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Execute warning on close if cell unchanged? (https://www.excelbanter.com/excel-programming/369993-execute-warning-close-if-cell-unchanged.html)

alex3867[_4_]

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


excelent

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



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com