Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default 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.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Application.EnableEvents=True after Thisworkbook.Close call John Fuller Excel Programming 3 September 4th 06 02:50 PM
ThisWorkbook.Saved = True does not work when Shapes().ControlFormat.Enabled = False Joe HM Excel Programming 0 August 3rd 06 07:46 PM
Can I disable a macro in "Thisworkbook" with true or false? Husker87 Excel Programming 7 February 17th 06 02:15 AM
Prompted to save even after setting wb.saved=true JE[_3_] Excel Programming 3 January 11th 05 01:19 AM
ThisWorkbook.Saved does not work! Niklas[_3_] Excel Programming 5 November 25th 03 01:26 PM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"