Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharing code with various applications

Status
Not open for further replies.

irishjoe

Programmer
Aug 5, 2002
76
AU
Hi,

I am looking for a way to share code amongst various applications. To start with it has to work with Excel and Access and later, vb.net.
I have various functions written in VBA and stored in the background of various applications and I am hoping to find a way of storing them all in a central place and set all the excel and access applications to run the code from there.

I have been looking into creating dlls and COM objects but I don’t really know where to start. Can anyone recommend a book that can explain the process of creating dlls/ COMs and connecting them to Excel and Access?

I have been able to create test dlls in VB.net express edition but they only work with other VB.net applications when the dll is added to references. Not been able to get Excel or access to use these dlls.

Or is there a better way of storing code in a central location?

Thanks to anyone who can point me in the right direction.
 
This is definitely not a complete solution, but it is a beginning. You state that you want to start with Excel macros ... since that is the case, I would recommend that you consider using Personal.xls to store your macros. This file will make any macro stored there instantly available to any workbook at all.

Once I discovered this (thanks to a posting on this site, BTW) I created the file and copied ALL my Excel macros there. Now, if a new workbook needs to perform a task already coded, I don't have to fuss with making another copy - just call the routine that already exists. This makes life a lot easier.

Hope this helps!

----------------------------------------------------------------------------------
"A committee is a life form with six or more legs and no brain." -- L. Long
 
That was my back up idea for excel. I can do the same with access by making a database and make all the databases reference this one.

Do I need to save the excel sheet as a *.xla or *.xll file then click Tools>Add-Ins then browse to the new excel sheet?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top