Link Command Button

  • Thread starter Thread starter FrankB
  • Start date Start date
F

FrankB

I have 27 Excel workbooks, each of which has a command
button to run a program written in Cplus. I presently
have this button on each workbook. If the program is
changed I would have to go into 27 workbooks to update the
program. Is there a way to "LINK" a command button to all
27 workbooks. My first thought is to open a new workbook
with just the macro code and assign the command button for
all 27 to this workbook. Will this work. Do you see any
problems doing it this way or have any suggestions.

Thanks
Frank
 
Does Cplus mean that it's an executable (*.exe)?

Does the program get executed by running a Shell statement?

If yes, then I would think that if you change the executable, it would be
transparent to the button (or code that's assigned to the button)--as long as
you didn't change the name of the executable.

If these buttons are from the Forms toolbar, you could have the assigned macro
in a separate workbook. When you click on the button, excel will run the macro
(if the other workbook is open) or go look for that other workbook, open it, and
then run the macro.

Another option might be to just build an addin that creates a toolbar that is
always visible. The users load that addin (to get the toolbar) and then there's
only one spot for the code.
 
Back
Top