Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default From EXE to DLL

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default From EXE to DLL

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)

"avi" wrote in message
ups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default From EXE to DLL

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

"avi" wrote in message
ups.com...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default From EXE to DLL

Thanks a lot

I'll try the approach

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default From EXE to DLL

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

"avi" wrote in message
ups.com...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"