Add-Ins: remote macro updates
On Jan 27, 10:16*am, Snoopy wrote:
Hey Guys :)
Austris hav push me a bit forward on this (thanks a lot), but I have
to move further.
I have a number of local/remote workbooks using macros.
Once in a while I have/want to update/adjust these local mprograms.
I understand that this can be done by using add-ins in the local
files, but I am not comfortable with the method.
My starting point is this:
The file TEST.XLSM is saved as TEST.XLAM (Add-In) and the two files
are identical.
Now I want the (visible) TEST.XLSM to use the macros of the
(invisible) TEST.XLAM.
I understand that this will have the effect that macros in TEST.XLAM
will be used on data in TEST.XLSM - am I right?
This is the ending point of mine .....
The remaining questions a
1. How do I make the two files cooperate/how does it work?
2. Is it wise to delete the macros in TEST.XLSM when the files just
use macros in TEST.XLAM?
3. If I - by occasion - rename the TEST.XLSM to TEST1.XLSM - will the
macros still refere to TEST.XLAM?
I hope someone will be kind to update my skills by guiding me on this
one.
Best regards
Snoopy
The remaining questions a
1. How do I make the two files cooperate/how does it work?
You need to "reference" the add-in from within TEST.XLSM
Go to the VBA editor for TEST.XLSM and goto <Tools<References
Browse to add your new add-in to the list and make sure that the
check box is ticked.
2. Is it wise to delete the macros in TEST.XLSM when the files just
use macros in TEST.XLAM?
When the add-in is operational the old code serves no purpose and
the fact that you effectively have two macros with the same names will
cause errors. You should delete it - if you feel unhappy about
pressing the delete button just comment the code out until you gain
confidence.
3. If I - by occasion - rename the TEST.XLSM to TEST1.XLSM - will the
macros still refere to TEST.XLAM?
Yes, it will still refer to the add-in because the newly named
file maintains it's reference.
A.
|