ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ThisWorkbook.Saved = True (https://www.excelbanter.com/excel-programming/446932-thisworkbook-saved-%3D-true.html)

Charlotte E.[_3_]

ThisWorkbook.Saved = True
 
Hi

I have a workbook, which perform some macro-actions when opened.

As the VERY LAST LINE in both 'Workbook_Ope'n and 'Workbook_Activate', I
have:

ThisWorkbook.Saved = True


....and yet, if I open the workbook, at immediatly close the workbook, it
asks me, if I want to save the changes, even that I haven't made a
single change?!?

It is as if the 'ThisWorkbook.Saved = True' has no effect???

What am I missing?


CE


Living the Dream

ThisWorkbook.Saved = True
 
Hi Charlotte

I have a similar thing happen.

In the On_Open() of one of my WB's, I have AutoCalculation set to
Manual, and in the On_Close it reset back to Auto, so even if I do
nothing in the WB it asks if I want to save.

Just a thought.

Cheers
Mick.

Charlotte E.[_3_]

ThisWorkbook.Saved = True
 
Nope - I know that a re-calculation of the workbook also changes the
Saved-flag :-)

But, at little search around the net, revealed that this apparrently is
a common problem, thus no-one can really say what's happening - or how
to avoid this...

CE




Den 24.08.2012 12:00, Living the Dream skrev:
Hi Charlotte

I have a similar thing happen.

In the On_Open() of one of my WB's, I have AutoCalculation set to
Manual, and in the On_Close it reset back to Auto, so even if I do
nothing in the WB it asks if I want to save.

Just a thought.

Cheers
Mick.


Peter T[_5_]

ThisWorkbook.Saved = True
 
In a new workbook try simply this

Private Sub Workbook_Open()
Range("A1") = Now
Columns("A:A").EntireColumn.AutoFit
ThisWorkbook.Saved = True
End Sub

Save, close, reopen, close, ?

Regards,
Peter T


"Charlotte E." wrote in message
...
Hi

I have a workbook, which perform some macro-actions when opened.

As the VERY LAST LINE in both 'Workbook_Ope'n and 'Workbook_Activate', I
have:

ThisWorkbook.Saved = True


...and yet, if I open the workbook, at immediatly close the workbook, it
asks me, if I want to save the changes, even that I haven't made a single
change?!?

It is as if the 'ThisWorkbook.Saved = True' has no effect???

What am I missing?


CE



Charlotte E.[_3_]

ThisWorkbook.Saved = True
 
Found a solution myself :-)

Thanks for your effort anyway, guys :-)

CE


Den 24.08.2012 11:31, Charlotte E. skrev:
Hi

I have a workbook, which perform some macro-actions when opened.

As the VERY LAST LINE in both 'Workbook_Ope'n and 'Workbook_Activate', I
have:

ThisWorkbook.Saved = True


....and yet, if I open the workbook, at immediatly close the workbook,
it asks me, if I want to save the changes, even that I haven't made a
single change?!?

It is as if the 'ThisWorkbook.Saved = True' has no effect???

What am I missing?


CE



All times are GMT +1. The time now is 11:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com