Personal.xls prompting to save, BeforeClose Event not workin

MandelBrah

New Member
Joined
Jul 26, 2007
Messages
11
I'm perplexed!!!

I have several macros that I coded in my Personal.xls file. For a while the following code suppressed the prompt to save each time I exited the application:

Private Sub Workbook_BeforeClose(Cancel as Boolean)
If Me.Saved = False Then
Me.Save
End If
End Sub

Now it has started prompting me again. I tried running Application.EnableEvents = True but this didn't do anything. I then tried to just pop up a MsgBox in the Workbook_BeforeClose event to see if it was even entering into the Sub before closing and it wasn't.

I'm a little stumped as to why this would be happening. Is there a add-in or something that I may be missing. Any help would be greatly appreciated because this is such an annoyance. Thanks!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

btadams

Well-known Member
Joined
Jan 6, 2003
Messages
1,942
Have you recently installed any add-ins or updated your pc? Does the workbook_beforeclose event work with other workbooks?

P.S. Welcome to the board
 

MandelBrah

New Member
Joined
Jul 26, 2007
Messages
11
Thank you for the welcome - I haven't really changed anything except that I backed up my personal.xls while I was working on some code, then afterwards deleted the working copy and restored the original.
 

btadams

Well-known Member
Joined
Jan 6, 2003
Messages
1,942
Does the workbook_beforeclose event work with other workbooks?
 

Forum statistics

Threads
1,181,405
Messages
5,929,756
Members
436,687
Latest member
Glass of Gin

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