ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add-in macro button assignment spontaneous change (https://www.excelbanter.com/excel-programming/406223-add-macro-button-assignment-spontaneous-change.html)

Stephen[_23_]

Add-in macro button assignment spontaneous change
 
I have excel files that I and several others in my group maintain
using macros from an add-in file that are located on the network
drive. We run the macros using form buttons that have the macros
assigned to them. For example, one button might be assigned to N:/
Budgets/BudgetMacros.xla!ClearCells. The reason that this add-in is
on the network drive is that it allows me to make changes without
having to re-distribute the file every time.

The problem is, when we email the file to a client (clients do not use
the macros) and get it back from the client, the button assignment has
changed to reference the C: drive instead of the network drive.
Example above: C:/Budgets/BudgetMacros.xla!ClearCells (which, of
course, does not exist).

We've experimented here in the office, and the it seems that just
opening the file from an email causes the change to happen (even if
the person opening the email has the add-in loaded).

Any thoughts on how to prevent this from happening, or how to overcome
it in a way that is not overly cumbersome? (Right now, we have to
remove the old buttons, and copy & paste new ones in from a file that
has correct assignments.)

Thanks in advance for any suggestions.

Ker_01

Add-in macro button assignment spontaneous change
 
Stephen-

I'm not surprised that the reference would change when opened on a PC that
doesn't have access to the macro. Has your team considered embedding a macro
within your workbook to test if the add-in is available, and if so, trigger
it from that local code? The button would be linked to the local code, of
course.

I'm not 100% sure that would work, but that's where I'd start if I had that
challenge in my environment.

HTH,
Keith

"Stephen" wrote in message
...
I have excel files that I and several others in my group maintain
using macros from an add-in file that are located on the network
drive. We run the macros using form buttons that have the macros
assigned to them. For example, one button might be assigned to N:/
Budgets/BudgetMacros.xla!ClearCells. The reason that this add-in is
on the network drive is that it allows me to make changes without
having to re-distribute the file every time.

The problem is, when we email the file to a client (clients do not use
the macros) and get it back from the client, the button assignment has
changed to reference the C: drive instead of the network drive.
Example above: C:/Budgets/BudgetMacros.xla!ClearCells (which, of
course, does not exist).

We've experimented here in the office, and the it seems that just
opening the file from an email causes the change to happen (even if
the person opening the email has the add-in loaded).

Any thoughts on how to prevent this from happening, or how to overcome
it in a way that is not overly cumbersome? (Right now, we have to
remove the old buttons, and copy & paste new ones in from a file that
has correct assignments.)

Thanks in advance for any suggestions.




Stephen[_23_]

Add-in macro button assignment spontaneous change
 
That is a great idea!

Thanks.


On Feb 15, 3:13*pm, "Ker_01" wrote:
Stephen-

I'm not surprised that the reference would change when opened on a PC that
doesn't have access to the macro. Has your team considered embedding a macro
within your workbook to test if the add-in is available, and if so, trigger
it from that local code? The button would be linked to the local code, of
course.

I'm not 100% sure that would work, but that's where I'd start if I had that
challenge in my environment.

HTH,
Keith

"Stephen" wrote in message

...



I have excel files that I and several others in my group maintain
using macros from an add-in file that are located on the network
drive. *We run the macros using form buttons that have the macros
assigned to them. *For example, one button might be assigned to N:/
Budgets/BudgetMacros.xla!ClearCells. *The reason that this add-in is
on the network drive is that it allows me to make changes without
having to re-distribute the file every time.


The problem is, when we email the file to a client (clients do not use
the macros) and get it back from the client, the button assignment has
changed to reference the C: drive instead of the network drive.
Example above: C:/Budgets/BudgetMacros.xla!ClearCells (which, of
course, does not exist).


We've experimented here in the office, and the it seems that just
opening the file from an email causes the change to happen (even if
the person opening the email has the add-in loaded).


Any thoughts on how to prevent this from happening, or how to overcome
it in a way that is not overly cumbersome? *(Right now, we have to
remove the old buttons, and copy & paste new ones in from a file that
has correct assignments.)


Thanks in advance for any suggestions.- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com