ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Modules and add-ins (https://www.excelbanter.com/excel-programming/326963-modules-add-ins.html)

SmilingPolitely[_3_]

Modules and add-ins
 
I have a large number of functions and subs stored in a module. I would
like to have this code available to all of my Excel apps without having
to import the module each time I create a new workbook.

Do I (somehow) make my module an add-in? If so, how? If not, what
should I do?

Any help is appreciated.



Excel 2002 on Win XP Pro (SP2)

Thief_

Modules and add-ins
 
An addin is the best way to go. In the VBE, Click on This Workbook and
change the IsAddin property to True then save the workbook as <whatever.xla

You can now use that wb as an addin!

--
|
+--Thief_
|


"SmilingPolitely" wrote in message
...
I have a large number of functions and subs stored in a module. I would
like to have this code available to all of my Excel apps without having
to import the module each time I create a new workbook.

Do I (somehow) make my module an add-in? If so, how? If not, what
should I do?

Any help is appreciated.



Excel 2002 on Win XP Pro (SP2)




keepITcool

Modules and add-ins
 


first:
it helps to give your VBAProject
(in the book containing your code)
a usefull name...
in the properties change the name to
vbaSMILE (or something ;)

Then select a workbook where you need the code..
goto Tools/Reference and put a checkmark next to:
vbaSmile

you'll see that in the ProjectExplorer a line is added:
Reference to SmilingCode.xls

Then you can access the procedures in that project..
Intellisense will help you..

Sub Test()
msgbox vbaSMILE.myfunction(1)

'or type
'vbaSmile.
'and intellisense should popup the public procedures in the project

end sub



Making it an xla or an xls doesn't matter for the above,
but if it is an .xla (and the IsAddin property = True)
the Macro dialog will NOT show your procedures.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


SmilingPolitely wrote :

I have a large number of functions and subs stored in a module. I
would like to have this code available to all of my Excel apps
without having to import the module each time I create a new workbook.

Do I (somehow) make my module an add-in? If so, how? If not, what
should I do?

Any help is appreciated.



Excel 2002 on Win XP Pro (SP2)



All times are GMT +1. The time now is 02:17 AM.

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