How do I stop xl2000 asking to save on closing workbook

Keirie1

New Member
Joined
Jan 15, 2004
Messages
11
Hi,

How do I stop xl2000's 'Save Yes/No' popping up on closing my workbook.

It only contains data on which I perform searches using a macro. I am not altering anything in the workbook.

The save query only started when I added macros to hide command bars/ toolbars etc. on opening & reinstate them on closing.

I added this in the 'ThisWorkbook' module:

Private Sub Workbook_Close()
With Application
.SaveChanges = False
End With
End Sub

But on joy, any ideas on why it is appearing and how I can stop it would be gratefully appreciated.

Cheers
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi!
try this one insted!

<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_BeforeClose(Cancel <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN>)
ThisWorkbook.Saved = <SPAN style="color:#00007F">True</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0
:LOL: EEEEEeeeeYYYaaaaaa!!!!!

May the Gods smile on you, your children and your children's children

Thank you
(y) (y) (y)


and Thanks to all who helped along the way.
(y) (y) (y)
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,936
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top