Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting Application.EnableEvents=True after Thisworkbook.Close call | Excel Programming | |||
ThisWorkbook.Saved = True does not work when Shapes().ControlFormat.Enabled = False | Excel Programming | |||
Can I disable a macro in "Thisworkbook" with true or false? | Excel Programming | |||
Prompted to save even after setting wb.saved=true | Excel Programming | |||
ThisWorkbook.Saved does not work! | Excel Programming |