VBA Editor doesn't warn about unsaved changes on exit

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,687
Office Version
  1. 365
Platform
  1. Windows
I thought I had made some changes to a UDF, but when I opened up the VBA editor today, the changes were gone. So I ran a little test. I made a simple change to some code, then closed the editor and then Excel. I did not get any warn about unsaved changes or any offer to save them. When I restarted Excel and reopened the editor, the changes were gone.

Is this normal? Do I have some setting wrong?
 
No it’s a manual save routine that I run after making changes.
Oh, OK.

Microsoft don’t care about VBA. It’s clearly not part of their vision for the future.
That means that they don't care about their customers, which means they don't care about me.

And this must have been the case since VBA was first released. Was it not part of their future then? Jerks.
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
For Personal in particular, I use this, because it both saves and creates a backup (I have been known to hose stuff with the best of intentions):

Code:
Sub BackupPersonal()
  Const sBak        As String = "C:\Users\shg\Documents\Docs - shg\Tech Notes\misc - Templates\Personal.xls."

  Application.DisplayAlerts = False
  With Workbooks("Personal.xls")
    .SaveCopyAs sBak & Format(Now(), "yyyy-mmdd-hhmm.bak")
    .Save
  End With
  Application.DisplayAlerts = True
End Sub

You still need to remember to run it.
 
Upvote 0
For Personal in particular, I use this, because it both saves and creates a backup (I have been known to hose stuff with the best of intentions):

Code:
Sub BackupPersonal()
  Const sBak        As String = "C:\Users\shg\Documents\Docs - shg\Tech Notes\misc - Templates\Personal.xls."

  Application.DisplayAlerts = False
  With Workbooks("Personal.xls")
    .SaveCopyAs sBak & Format(Now(), "yyyy-mmdd-hhmm.bak")
    .Save
  End With
  Application.DisplayAlerts = True
End Sub

You still need to remember to run it.

That's helpful, thanks. I take backups all the time, especially just before making anything other than trivial changes. (I bet I've hosed way more code than you have.)

I consider this behavior by M$FT to be grossly negligent and arrogant. This is just horrible corporate behavior. Sadly, it's not rare. Woody Leonhard documented 500-600 pages of total screw-ups in various versions of Word. MAny have not been fixed to this day. Is Word also not in their future plans? :mad::mad::mad: (One wasn't enough.)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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