ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to attach a code module to a group of workbooks? (https://www.excelbanter.com/excel-programming/336805-how-attach-code-module-group-workbooks.html)

keithb

How to attach a code module to a group of workbooks?
 
Is there a way to use a common code module and attach it to more than one
workbook? If so, how do you make its procedures and funtions available to
the workbook and the worksheets in the workbooks where it is attached.

Thanks,

Keith



Bob Phillips[_6_]

How to attach a code module to a group of workbooks?
 
No, but you code put the code in an add-in. Then you run the code in the
add-in like so

Application.Run "myaddin.xla"mymacro"

--
HTH

Bob Phillips

"keithb" wrote in message
...
Is there a way to use a common code module and attach it to more than one
workbook? If so, how do you make its procedures and funtions available to
the workbook and the worksheets in the workbooks where it is attached.

Thanks,

Keith





Nigel_hough[_2_]

How to attach a code module to a group of workbooks?
 

Hi Not sure if this is what you want but

If you put all of your code into one workbook and then save it on the
save as menu select xla rather than an xls and save it as a .xla

This will save it as and excel add-on.

Then this add-on should load with excel everytime. You can the call the
methods from and workbook and even have custom menus that call menus. On
the menus just type the method name mymethod() or call it in code
Call mymethod()

I have my own set of functions that i use as well as the excel standard
ones.

Hope This Helps

:)


--
Nigel_hough
------------------------------------------------------------------------
Nigel_hough's Profile: http://www.excelforum.com/member.php...o&userid=20623
View this thread: http://www.excelforum.com/showthread...hreadid=394266



All times are GMT +1. The time now is 01:55 AM.

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