P.S. I spoke too soon. The dialog has come back, and it still appears
every time I run the macro, even running it manually, and even
executing nothing except simply closing again.
Thanks.
***
P.P.S. I think I spoke even too sooner.
I don't think it has to do with the macro at all.
The macro is Sub Auto_Open, so it executes automatically on load.
I changed its name and don't run the macro at all any more.
On loading the workbook then File / Close, I get the Save dialog. So
is there something in the sheet itself that somehow dynamically
changes upon loading?
Answer: There may be. There is a formula in cell A1. I gotta debug it.
Guess y'all can ignore this thread 'til I find out how the hell I'm
shooting myself in the foot.
***
baobob@my-deja.com - 26 May 2008 20:38 GMT
Aaagggghh!
My fault. I commented out my formula and that stopped the Save dialog.
So it's programmer recreational drug use--again.
***
But do I have a suspicion that Excel 2002 flags the Save condition
differently than previous versions? Because I think I've used that
formula for some years without incident.
***
Per Jessen - 26 May 2008 20:40 GMT
On 26 Maj, 21:25, bao...@my-deja.com wrote:
> P.P.S. I think I spoke even too sooner.
>
[quoted text clipped - 14 lines]
>
> ***
Hi
If the value in the formula in A1 changes, then excel will always
prompt to save the workbook.
To avoid this, you can use a workbook_beforeClose event like below:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub
Regards,
Per