Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a workbook containing a number of control buttons, which is connected to a number of macros in the same workbook.
The workbook is send out by mail.
I want to separate code and buttons in 2 workbooks – 1 containing the control buttons and another containing code.
I only want to send out the workbook containing the control buttons.
Is that possible?
I tried, but get thean error. The macros can’t found because they are in an outlook temp library.
Are there any tricks, I could use to get around this?
Posted

No it is not possible, it is an Excel constraint.
Control buttons must have their associated macros in same WorkBook.

All you can do is cascading macros.
The WorkBook with buttons have special macros that handle the buttons and call the real macros in second WorkBook.
The macros in first WorkBook have to check if called macro is available and give a nice message otherwise.
 
Share this answer
 
Comments
Koppelgaard 20-Sep-15 15:16pm    
I forgot to tell that the macros are on a shared drive which everybody can access. But that does not make any difference ?
Patrice T 20-Sep-15 17:15pm    
No difference.
No it is not possible. If the workbook does not contain the macros then pressing the buttons will just cause an error. That's like buying someone a car but not sending them the engine.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900