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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,946
Members
449,275
Latest member
jacob_mcbride

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