Bob:
Thanks for the response.
My problem is this (bear with me: this is a bit complicated).
I'm writing an AddIn (AI) in Excel 97, because if I use 2000 or 2002, we
disenfranchise many of our users. I can't "sign" the AI from 97, so I write
it in 97 and then load it into 2000 to be signed and converted from an XLS
to an XLA (I have to develop as an XLS because I'm embedding sheets in the
AI, and once it is converted from an XLS to an XLA, I lose control over the
sheets).
Every once in a while, during the manual conversion from the 97 XLS to the
2000 XLA, I forget, and do a Save instead of a Save As. The result is an
XLS file that can no longer be accessed from 97. I then have to go into the
XLS using 2000 and export all of the forms and code modules. I then create
a new WB containing all of the old sheets, switch from 2000 to 97, and
import the forms and code modules. A huge pain in the neck, and I've
already had to do it twice. Along the way, I rename the WB from, say, fred1
to fred2, so that I don't accidentally write on top of the only file that I
still have that contains my precious code.
The problem occurs later on, when I'm trying to use the newly resurrected WB
in 97. Often, the OnAction event procedure names contain the complete path
and file name of the OLD file ("fred1"), even though the new WB file name is
"fred2". When the events occur, they attempt to open the old WB (executing
old code). Terribly confusing. I spent many hours trying to figure out why
changes in code were not being executed. Sigh.
I managed to write a procedure that "fixes" all of the OnAction file names,
but I cannot figure out how to fix the Action file names (which are also
incorrect). I can't figure out how to access them at all.
So. Huge wastes of time, lots of code getting written to work around MS
bugs. Sigh.
So. Any idea how I can fix the event file names programmatically? Last
time I had to re-enter all of them manually, which was another entire waste
of time.
Thanks for listening.
Jon