Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default The VBA IDE will discard changes without warning

I'm no expert, but I have been using VBA for years. Something just
happened that I can hardly believe.

I made a few minor changes, mostly cosmetic, to a UDF in a personal
add-in module. I usually save after every change (Ctrl-S). I guess I
was distracted and just closed the editor and Excel. When I reopened
the add-in module, the changes were not there.

As a test, I made a couple of changes and closed the editor without
saving. I got no warning that I had unsaved changes. The add-in file
time stamp did not change and when I reopened the module, the changes
were gone.

Did I change some setting by mistake?

Is there a way that I can get the IDE editor to warn me if I am about
to lose changes?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default The VBA IDE will discard changes without warning

This is getting repetitive, but that shouldn't happen <g

Even if you don't save in the VBIDE, when you close the workbook or close
Excel, it should ask you because the file has changed.

--

HTH

Bob

"Prof Wonmug" wrote in message
...
I'm no expert, but I have been using VBA for years. Something just
happened that I can hardly believe.

I made a few minor changes, mostly cosmetic, to a UDF in a personal
add-in module. I usually save after every change (Ctrl-S). I guess I
was distracted and just closed the editor and Excel. When I reopened
the add-in module, the changes were not there.

As a test, I made a couple of changes and closed the editor without
saving. I got no warning that I had unsaved changes. The add-in file
time stamp did not change and when I reopened the module, the changes
were gone.

Did I change some setting by mistake?

Is there a way that I can get the IDE editor to warn me if I am about
to lose changes?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default The VBA IDE will discard changes without warning

I have never been asked to save changes in my personal macros add-in when
closing Excel.

Personal.xls or any other workbook.......yes, I get asked.


Gord Dibben MS Excel MVP

On Fri, 30 Apr 2010 18:49:01 +0100, "Bob Phillips"
wrote:

This is getting repetitive, but that shouldn't happen <g

Even if you don't save in the VBIDE, when you close the workbook or close
Excel, it should ask you because the file has changed.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default The VBA IDE will discard changes without warning

Hello Prof:
I reviewed your question, and most of the hits I saw were dealing with
network drive issues. Are you running this from a network or saving the file
to a network? If so, then I would look at that.

I checked a couple of other ideas, such as an active
Application.DisplayAlerts = False, or changing the file to Read-Only, but
neither of those attempts created any issues.

--
Rich Locus
Logicwurks, LLC


"Prof Wonmug" wrote:

I'm no expert, but I have been using VBA for years. Something just
happened that I can hardly believe.

I made a few minor changes, mostly cosmetic, to a UDF in a personal
add-in module. I usually save after every change (Ctrl-S). I guess I
was distracted and just closed the editor and Excel. When I reopened
the add-in module, the changes were not there.

As a test, I made a couple of changes and closed the editor without
saving. I got no warning that I had unsaved changes. The add-in file
time stamp did not change and when I reopened the module, the changes
were gone.

Did I change some setting by mistake?

Is there a way that I can get the IDE editor to warn me if I am about
to lose changes?
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default The VBA IDE will discard changes without warning

You could have code, someplace, that tells Excel not to save the workbook...
ThisWorkbook.Saved = True
or maybe something in the ThisWorkbook.BeforeClose event that does the same thing.
--
Jim Cone
Portland, Oregon USA




"Prof Wonmug"
wrote in message ...
I'm no expert, but I have been using VBA for years. Something just
happened that I can hardly believe.

I made a few minor changes, mostly cosmetic, to a UDF in a personal
add-in module. I usually save after every change (Ctrl-S). I guess I
was distracted and just closed the editor and Excel. When I reopened
the add-in module, the changes were not there.

As a test, I made a couple of changes and closed the editor without
saving. I got no warning that I had unsaved changes. The add-in file
time stamp did not change and when I reopened the module, the changes
were gone.

Did I change some setting by mistake?

Is there a way that I can get the IDE editor to warn me if I am about
to lose changes?


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default The VBA IDE will discard changes without warning

Actually that should be...
Workbook_BeforeClose not ThisWorkbook.BeforeClose
Jim Cone



"Jim Cone"
wrote in message ...

You could have code, someplace, that tells Excel not to save the workbook...
ThisWorkbook.Saved = True
or maybe something in the ThisWorkbook.BeforeClose event that does the same thing.
--
Jim Cone
Portland, Oregon USA


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default The VBA IDE will discard changes without warning

I've seen this happen when I have two instances of Excel open and without
realizing it, changed the "read only" version, not the version that can be
edited.
--
HTH,

Barb Reinhardt



"Prof Wonmug" wrote:

I'm no expert, but I have been using VBA for years. Something just
happened that I can hardly believe.

I made a few minor changes, mostly cosmetic, to a UDF in a personal
add-in module. I usually save after every change (Ctrl-S). I guess I
was distracted and just closed the editor and Excel. When I reopened
the add-in module, the changes were not there.

As a test, I made a couple of changes and closed the editor without
saving. I got no warning that I had unsaved changes. The add-in file
time stamp did not change and when I reopened the module, the changes
were gone.

Did I change some setting by mistake?

Is there a way that I can get the IDE editor to warn me if I am about
to lose changes?
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error on Discard of Checkout Barb Reinhardt Excel Programming 0 July 14th 09 04:05 PM
Discard Repeated Data? evoxfan Excel Discussion (Misc queries) 1 May 28th 09 02:41 AM
Sort or Filter to discard unnecessary data rylv5050 Excel Programming 1 February 9th 09 08:47 PM
Warning Box Looping through Excel Programming 4 April 5th 08 01:06 AM
Prompts to Discard digital signature while saving Jaydeep Excel Programming 0 April 12th 07 01:00 PM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"