Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default 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
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
execute macro; save it and close using Application.OnTime ina Excel Programming 1 May 12th 06 05:20 PM
Execute warning message Pat Excel Programming 3 February 21st 06 11:11 PM
Warning message on file close Lambtwo Excel Worksheet Functions 1 October 25th 05 03:31 AM
Leave the Cell unchanged Gerrym Excel Programming 2 November 29th 04 01:06 PM
Wav Warning Upon Attempt to Close Userform golf4 Excel Programming 2 April 8th 04 02:51 AM


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

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

About Us

"It's about Microsoft Excel"