From EXE to DLL

A

avi

Hello,

I have developped an exe application from vb6 that i call from VBA
with shell statement. It works fine although runs quite slow when the
spreadsheet is large and the application has to deal with a lot of
comm. with Excel.

The application starts a form by wich all the actions are preformed.

I woud like to know if and how to transform the exe into a dll, so
communication with excel should be faster

Any guidance will be very appreciated

Notes:

My knowledge in class stuff in VB6 is quite elementary
In a previous post i've got strong recommendation to dll my
application, but due to a lack of knowledge, i have preferred the
straightforward and more easy exe way but paid with a lack of
efficiency
 
B

Bob Phillips

You should examine your design and your coding before looking to go to a
DLL.

Re-design of key parts will usually make biggest savings.

Efficient coding, such as not selecting cells, will also help.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

RB Smissaert

There isn't much difference in coding an ActiveX dll compared to an .exe.
Start a new ActiveX dll project, put your old .exe code in a class and make
the code available via public subs or funtions.
If you compile with the instancing Global MultiUse then you can access
these functions and subs directly from Excel after having set a reference
under
Tools, References to that dll.
That is basically it. Plenty of examples available on the www.
You could pass the Excel application object to the dll as a sub or function
argument.

RBS
 
N

NickHK

As I understand it, the main advantage in a DLL is to avoid cross process
marshalling, which, especially for COM, is expensive.
You would have to add some Public classes in order to interact with the DLL
objects.
Depends on what you are currently doing, but should not be too difficult.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top