From: Prof Wonmug on
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?
From: Bob Phillips on
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" <wonmug(a)e.mcc> wrote in message
news:kr0mt51gp16o01ffljvvu939451vok3440(a)4ax.com...
> 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?


From: Rich Locus on
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?
> .
>
From: Jim Cone on
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" <wonmug(a)e.mcc>
wrote in message news:kr0mt51gp16o01ffljvvu939451vok3440(a)4ax.com...
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?
From: Jim Cone on
Actually that should be...
Workbook_BeforeClose not ThisWorkbook.BeforeClose
Jim Cone



"Jim Cone" <james.coneXXX(a)comcast.netXXX>
wrote in message news:uahdrHJ6KHA.1888(a)TK2MSFTNGP05.phx.gbl...

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