View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Carlo Carlo is offline
external usenet poster
 
Posts: 179
Default Excelfile wants to save before closing

Hi Mike

thanks a lot for your answer.

I'm going to do it with the displayalert, but I'm going to query
if a certain cell has the right state. If it has, nothing needs to
be changed. So I can live with that.
But nevertheless i'm going to try and find out what changes,
I'm quite sure it is a Worksheet Function I wrote which gets
triggered after Save. But I'm having a look at this.

Thanks a lot for your quick answer

Carlo

"Mike" wrote:

You can set displayalerts=false in the before close dialog and Excel won't
remeber this the next time it is opened but this is risky becuase if there is
a genuine need to save before closing the macro will run again and you won't
be alerted.

It is far more likely that something is actually changing in the workbook.
You could try and detect changes you are unaware of by putting something in
the sheet acahnge macro temporarilly.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
msg = "I've changed"
MsgBox (msg)
End Sub

This will alert you and maybe help you track changes you are unaware of.

"Carlo" wrote:

Hi all

I have a File which always asks me to Save before I close, even if I have
saved it 2 seconds before. Is there a possibility to tell excel that it
doesn't need to ask?
Can I just set the Displayalerts to false before closing? I'm afraid that it
would save this state and the next time I open Excel Displayalerts would
still be on false.

Any help is appreciated

Thanks in advance

Carlo