B
bz
Google shows me many who have asked this question, but no solutions. The
problem seems to have existed since the early days of VB macros being
incorporated into excel.
The problem: intermittently when an excel document with VB macros attached
to a menu bar and/or a task bar is save-as renamed, the links to the
macros point to the OLD excel file's name[with the full path being given!].
This makes the wrong macros execute or give an error message when
attempting to execute the macros.
If the file names [and paths] were NOT stored, things would work fine. If
the full path were not specified AND the correct file name were stored,
everything would still be ok.
I realize that there may be times when one would WANT to execute macros
that were NOT part of the current spread sheet. I just don't know how to
tell excel that this is NOT one of those times and make sure it ALWAYS
knows that. Perhaps I have missed seeing a 'check box' somewhere.
It would seem possible to write a macro that would search through and
change every 'path/filename!macroname' to 'macroname'
(or should it be '!macroname'?),
and make this macro auto-execute when ever the spreadsheet is saved, but
the fact that no one seems to have done it would seem to indicate that
there are problems in creating such a solution. Have I missed seeing an
already published solution?
[Why in the world hasn't MS fixed this problem by now? is another question]
--
bz
please pardon my infinite ignorance, the set-of-things-I-do-not-know is an
infinite set.
(e-mail address removed) [remove c h 1 0 0 - 5 to avoid spamtrap]
problem seems to have existed since the early days of VB macros being
incorporated into excel.
The problem: intermittently when an excel document with VB macros attached
to a menu bar and/or a task bar is save-as renamed, the links to the
macros point to the OLD excel file's name[with the full path being given!].
This makes the wrong macros execute or give an error message when
attempting to execute the macros.
If the file names [and paths] were NOT stored, things would work fine. If
the full path were not specified AND the correct file name were stored,
everything would still be ok.
I realize that there may be times when one would WANT to execute macros
that were NOT part of the current spread sheet. I just don't know how to
tell excel that this is NOT one of those times and make sure it ALWAYS
knows that. Perhaps I have missed seeing a 'check box' somewhere.
It would seem possible to write a macro that would search through and
change every 'path/filename!macroname' to 'macroname'
(or should it be '!macroname'?),
and make this macro auto-execute when ever the spreadsheet is saved, but
the fact that no one seems to have done it would seem to indicate that
there are problems in creating such a solution. Have I missed seeing an
already published solution?
[Why in the world hasn't MS fixed this problem by now? is another question]
--
bz
please pardon my infinite ignorance, the set-of-things-I-do-not-know is an
infinite set.
(e-mail address removed) [remove c h 1 0 0 - 5 to avoid spamtrap]