![]() |
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 |
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 |
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 |
From EXE to DLL
Thanks a lot
I'll try the approach |
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 |
All times are GMT +1. The time now is 09:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com