View Single Post
  #4   Report Post  
Matt Lunn
 
Posts: n/a
Default

You can bypass this by setting the workbooks Saved property to True during
the close event. Let me know if you need to know where to put the code.

Private Sub Workbook_BeforeClose(Cancel As Boolean)

If Sheets(1).Range("A1") = "Y" Then

ActiveWorkbook.Saved = True

End If

End Sub


You would need to have an indicator as to whether the invoice is complete or
not. In this example, if Cell A1 in Sheet 1 is not equal to Y then you will
get the save prompt. If Cell A1 contains the letter Y, the workbook will
close without saving.

HTH,

Matt





"Menno Hershberger" wrote:

This has been bugging me for about three years now, so I thought I'd see if
there was a solution. I run a computer shop. I do all my invoices in Excel
and keep them all in one folder. Sometimes I want to go back and look at a
customer's invoice from the past to familiarize myself with what previous
repairs, upgrades, or whatever that I did before. I sort the folder by
date. Whenever I open the invoice to just look at it and go to close it
again it always asks me if I want to save my changes. I didn't MAKE any
changes! Once in a while, not thinking, I'll click Yes and then I wind up
with a new time stamp on the file, which of course puts it out of order.
The only way I can get it right again is to change my computer date back to
the original date and save it yet again.
Right now I'm running Office XP-SP2 but it did it in previous versions of
Office also.
Why does it do this and is there any way I can stop it?
Thanks.

--
--- A Freudian slip is when you say one thing but mean your mother. ---