ThisWorkbook.Saved = True

C

Charlotte E.

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
 
L

Living the Dream

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.
 
C

Charlotte E.

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:
 
P

Peter T

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
 
C

Charlotte E.

Found a solution myself :)

Thanks for your effort anyway, guys :)

CE


Den 24.08.2012 11:31, Charlotte E. skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top