I have several excel files that make use of a central "macros file". This allows the macros to be coded once, instead of being duplicated across many files.
Anyway, I have buttons within the "driving files" that launch the various remote-macros. This works fine. However, one annoyance is that when the user closes the "driving file", the "macro-file" is now open and must also be closed. I would like to eliminate this by simply placing a command within the "macros file" that everytime it is run, the final step would be to "close the file from which the current macro is running". Can this be done in some generic way? Remember, this is NOT the activeworkbook, and I would rather NOT
have to hard-code a file-name because if the name changes it would no longer work.
Thanks in advance.
Ron
Anyway, I have buttons within the "driving files" that launch the various remote-macros. This works fine. However, one annoyance is that when the user closes the "driving file", the "macro-file" is now open and must also be closed. I would like to eliminate this by simply placing a command within the "macros file" that everytime it is run, the final step would be to "close the file from which the current macro is running". Can this be done in some generic way? Remember, this is NOT the activeworkbook, and I would rather NOT
have to hard-code a file-name because if the name changes it would no longer work.
Thanks in advance.
Ron