Quote:
Originally Posted by tesoke
1) Why macros do not work after deleting, renaming or moving the source file, which we define them in it?
|
Because if you define the file as one thing, then change it to something else, how is the macro supposed to know? The only file a macro can work out file names & paths for after they've been changed is the file containing it. Even then, if you change a worksheet name, position in the file, add or delete a worksheet, that could break a macro. It is up to you to maintain the code so that it works in such cases.
Quote:
Originally Posted by tesoke
2) Is there any way to solve this problem? Can we define macros in a way to not misworking after deleting, renaming or moving the source file?
|
Sure, but you have to code the macro to do what you want it to under such circumstances.