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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

SIXTH SENSE

Well-known Member
Joined
Oct 29, 2003
Messages
1,883
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>
 

Keirie1

New Member
Joined
Jan 15, 2004
Messages
11
: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)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,159
Messages
5,768,525
Members
425,480
Latest member
br400821

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
Top