Excelfile wants to save before closing
What I just found out:
If I debug the value of displayalerts it is always true,
I can't change it in the beforeclose sub, could that be??
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
|