Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 6th, 2011, 03:48 PM
Authorized User
 
Join Date: Dec 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel VBA to a DLL

Hi

I've written a bunch of financial analysis stuff in VBA user defined functions as part of a model and I'm talking to a potential user (a major bank) who doesn't want to use it in Excel but instead wants a DLL they can address from their systems. I'm kind of thinking I could move my VBA stuff over to Visual Basic (which I've never used, but hey, it's basic after all!) and then use this to migrate the functionality to a DLL.

I really have no idea if this is a viable strategy and wonder if anyone could advise or suggest a viable alternative. I'm pretty comfortable with VBA but haven't done anything like C or C++ before.. I did suggest an Add-In but that didn't seem to cut it for them.

Thanks for any advice

Pavesa
 
Old May 6th, 2011, 04:08 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 171
Thanks: 0
Thanked 14 Times in 14 Posts
Default

VB.Net is not similar enough to VBA so that you can move it over. You'd do better to learn a new language and rewrite it. Try c#
 
Old May 7th, 2011, 08:56 PM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I did something like this with one of my add-ins. I moved the proprietary code into an ActiveX DLL using VB6. In VB6 all you need to do is move the code into the DLL. Existing VBA code needs very little modification.

Then you compile ("make") the DLL file and distribute it to your end users.

There's a simple explanation here: http://www.vb-helper.com/howto_activex_dll.html
__________________
Regards,
JP
JP SoftTech
 
Old May 11th, 2011, 07:49 PM
Authorized User
 
Join Date: Dec 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi JP

thanks very much for the guidance. The question that comes to mind is how widely usable is an ActiveX DLL? Does it have limitations or is it really like any other DLL? I guess the bank I'm talking to are running some kind of Enterprise Oracle system or something, maybe with a lot of proprietary non-Microsoft based stuff, so are ActiveX DLL's universally usable?

Andrew
 
Old May 14th, 2011, 09:26 PM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

You could try asking their IT people. As long as their software has some kind of COM interface, you could use an ActiveX DLL. That's my understanding.
__________________
Regards,
JP
JP SoftTech
 
Old May 17th, 2011, 08:01 AM
Authorized User
 
Join Date: Dec 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi JP

thanks very much for all the advice. I'll talk to their IT people, thanks to your help I now have a suggestion for the discussion

Best regards

Andrew





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Conversion Excel 2003 VBA codes to Excel 2007 sunny76 BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2 0 August 13th, 2009 05:38 AM
Calling VB.Net Dll from Excel VBA zyphax Pro VB.NET 2002/2003 4 July 16th, 2007 08:41 PM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM
DLL & Excel - keep having to reset DLL reference! James Diamond Pro VB 6 2 May 25th, 2004 03:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.