Add-Ins: remote macro updates

S

Snoopy

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 are:
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
 
A

Alan

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 are:
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 are:
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.
 
S

Snoopy

The remaining questions are:
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.– Skjul sitert tekst –

– Vis sitert tekst –

Just perfect instructions
Ill dive into this at once - thanks a LOT! Alan!!

Have a really nice day
Best Regards Snoopy
 
S

Snoopy

The remaining questions are:
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.– Skjul sitert tekst –

– Vis sitert tekst –

Thanks
I still strugle:

I have saved the add-ins as TEST.XLAM - directly to disc F:
Then I went to <Tools><References> i in VBA editor of the TEST.XLSM
file
The browsing (Add Reference dialog box) will not visualize the add in
which look for Files of type = (*.olb,*tlb,*.dll)
By searching for all files I find my TEST.XLAM all right, but choosing
this one seems to generates a add-in called VBAProject.
All together this causes a VBA failure called Name conflicts with
existing module, project or object library

I feel I am close to the solution, but dont see what to do next,
kindly ask you guys for som more help and guiding :)
Best Regards
Snoopy
 
A

AB

Launch Excel.
Open just the .xlam.
Go to VBE.
On the left-hand pane select the vbaProject (Test.xlam).
Tools>ProjectProperties.
Put something logical into the Project Name box (like
MyFirstXLA_TEST)>OK.
Still in the VBA: Files>Save (you have to do the save here as
otherwise closing the Excel it won't ask you for saving changes to the
xla and won't save the changes made).

Now, you'll see that on the left side pane the project isn't called
anymore generically VBAProject but your chosen name (MyFirstXLA_TEST).
Now you can reference it and VBE won't refuse to accept it as the
xla's project name will be something more meaningful.

All in all - it was the vba project name that didn't let you reference
it.
 
A

Alan

Thanks
I still strugle:

I have saved the add-ins as TEST.XLAM - directly to disc F:
Then I went to <Tools><References> i in VBA editor of the TEST.XLSM
file
The browsing  (Add Reference dialog box) will not visualize the add in
which look for Files of type = (*.olb,*tlb,*.dll)
By searching for all files I find my TEST.XLAM all right, but choosing
this one seems to generates a add-in called VBAProject.
All together this causes a VBA failure called Name conflicts with
existing module, project or object library

I feel I am close to the solution, but dont see what to do next,
kindly ask you guys for som more help and guiding :)
Best Regards
Snoopy- Hide quoted text -

- Show quoted text -


When you browse simply change the file type you are looking for
to .xlam by using the "down arrow" on the "Files of Type" combo box.

Good luck!

A.
 
S

Snoopy

When you browse simply change the file type you are looking for
to .xlam by using the "down arrow" on the "Files of Type" combo box.

Good luck!

A.– Skjul sitert tekst –

– Vis sitert tekst –

This was nice information
So far so good :)

And my TEST.XLSM now uses the FirstTime(Test,xlam) macros - no data in
TEST.XLSM will be desturbed by the fact that there is different data
in the new update-file (saved as text.xlam) and the ongoing Test.xlsm?

Best Regards Snoopy
 
S

Snoopy

This was nice information
So far so good :)

And my TEST.XLSM now uses the FirstTime(Test,xlam) macros - no data in
TEST.XLSM will be desturbed by the fact that there is different data
in the new update-file (saved as text.xlam) and the ongoing Test.xlsm?

Best Regards Snoopy– Skjul sitert tekst –

– Vis sitert tekst –

Thansk to all of you !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top