PDA

View Full Version : Transform a VBA module in a compiled Add-In for Excel



lucio5295
12-05-2013, 09:04 PM
Good morning.
For a technical application I'm using Excel 2013 as a user interface, to show inputs and results with tables and charts.
In this VBA project, calculations are made in a large module that contains only subroutines for number-crunching.
In these subroutines the inputs and outputs are Public variables and there is no reference to Excel objects.
I would like to turn this VBA module in a compiled Add-In, running under the Main program written again in VBA.

Question: what is the easiest way to create this compiled add-in and how to do it?

I don't know C++, but I read somewhere that you can create compiled add-ins for Excel also using VBA.
I would be grateful if you could advise me some papers which explain the best procedure in VB or VBA, in a simple and comprehensive way, with examples step by step.

Any suggestion will be welcome.
Thanks and regards.
Lucio

snb
12-05-2013, 09:53 PM
crossposted:

The Code Cage Forums - View Single Post - Transform a VBA module in a compiled Add-In for Excel (http://www.thecodecage.com/forumz/1055009569-post1.html)
& ozgrid

bakerman
12-05-2013, 10:32 PM
Dear Lucio,

Please read following message regarding crossposting.

http://www.excelfox.com/forum/f25/message-to-cross-posters-1172/#post5326

Excel Fox
12-05-2013, 10:46 PM
Hope you've read and understood the http://www.excelfox.com/forum/f25/message-to-cross-posters-1172/
(http://www.excelfox.com/forum/f25/message-to-cross-posters-1172/#post5326)
To save code as an add-in, just look up topics in a search engine and get results like Create Your Own Excel Add-In | PCMag.com (http://www.pcmag.com/article2/0,2817,715709,00.asp)

lucio5295
12-07-2013, 12:32 PM
Sorry,
it is the first time that I see messages about the crossposting issue.
I thought that the forums were in free competition.
Thanks for the warning

lucio5295
12-07-2013, 12:35 PM
Regarding your answer, it is understood that a XLAM is not the solution.

I want to turn a VBA module of math., with no reference to Excel objects, in a compiled Add-in, quick, safe and simpler to deploy.

• Keeping in mind that I don't want to automate Excel objects, but only subroutines for numeric calculations, I would like to know if it is preferable a COM, a DLL or something else.

• I would like to know also if it is really necessary to compile with VB (as for example I read that you can create COM files in a simpler way, with VBA).

I hope that it is clearer now.
Finally, I would be grateful if you could also advise me documents on what you feel is the best procedure for my target.

Thanks and regards.