M
Mark Dev
All,
Using Excel XP, I have created an Add-In which contains a worksheet. When
the add-in is loaded, the worksheet is populated with data and then a copied
to the client workbook. The worksheet also contains a command button.
Two issues:
1. If I use the Control Box command button, it is not copied to the client
worksheet along with the rest of the form. The click event code appears in
the general section of the form, but the control itself is not copied.
2. If I use the Forms command button, it is copied correctly to the client,
but the "Assign Macro" value still contains a reference to the Add-In (i.e.
"MyAddIn!CommandButtonAction"). If the user saves the client worksheet and
then happens to re-open it when the Add-In is not loaded, clicking the
button causes an immediate run-time error, that I am unable to trap.
I'd like to have the command button refer to a procedure in the copied
client worksheet so I'll have an opportunity to check for the existence of
the Add-In and raise an appropriate error if it is not loaded.
I have no preference as to which type of command button that I use, as long
as it performs correctly.
Any suggestions will be most appreciated.
Thanks,
Mark
Using Excel XP, I have created an Add-In which contains a worksheet. When
the add-in is loaded, the worksheet is populated with data and then a copied
to the client workbook. The worksheet also contains a command button.
Two issues:
1. If I use the Control Box command button, it is not copied to the client
worksheet along with the rest of the form. The click event code appears in
the general section of the form, but the control itself is not copied.
2. If I use the Forms command button, it is copied correctly to the client,
but the "Assign Macro" value still contains a reference to the Add-In (i.e.
"MyAddIn!CommandButtonAction"). If the user saves the client worksheet and
then happens to re-open it when the Add-In is not loaded, clicking the
button causes an immediate run-time error, that I am unable to trap.
I'd like to have the command button refer to a procedure in the copied
client worksheet so I'll have an opportunity to check for the existence of
the Add-In and raise an appropriate error if it is not loaded.
I have no preference as to which type of command button that I use, as long
as it performs correctly.
Any suggestions will be most appreciated.
Thanks,
Mark