ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to communicate between Excel and VB6 ? (https://www.excelbanter.com/excel-programming/314609-how-communicate-between-excel-vb6.html)

PM

How to communicate between Excel and VB6 ?
 
Hi !

I know how to open a workbook from VB6 using Automation.
But can I open a VB program from Excel?

(a) I don't seem to find the adequate objects in the VB library...
(b) If the answer is yes, then what about compiled VB code ??

I bet the general question is : since I read on this very page that "I you
dont want to share data, don't put it in Excel", then how do I efficiently
hide my code from unauthorized viewers ? My idea was to use VB...

Hope you great wizzards can give me a hint or a reference !

Pat



Dale Preuss[_2_]

How to communicate between Excel and VB6 ?
 
Pat,

Check out the "Shell" function for running another compiled application.

Your VBA code may be hidden from view and password protected. In the VBA
editor, right click your project in the project window, then VBA Project
Properties...

Dale

"PM" wrote:

Hi !

I know how to open a workbook from VB6 using Automation.
But can I open a VB program from Excel?

(a) I don't seem to find the adequate objects in the VB library...
(b) If the answer is yes, then what about compiled VB code ??

I bet the general question is : since I read on this very page that "I you
dont want to share data, don't put it in Excel", then how do I efficiently
hide my code from unauthorized viewers ? My idea was to use VB...

Hope you great wizzards can give me a hint or a reference !

Pat




Stephen Bullen[_4_]

How to communicate between Excel and VB6 ?
 
Hi Pm,

then how do I efficiently
hide my code from unauthorized viewers ? My idea was to use VB...


The easiest way is to implement your code as classes in a VB6 ActiveX
exe. Your VBA code can then have a reference to the project,
instantiate those classes and run the code in them.

I'm sure there are examples of doing this online, but I don't know of
any off the top of my head. It is one of the topics we cover in
'Professional Excel Development', due out in January.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk



PM

How to communicate between Excel and VB6 ?
 
Many, many thanks !
I now have another piece to learn, though !!



"Stephen Bullen" a écrit dans le message de news:
...
Hi Pm,

then how do I efficiently
hide my code from unauthorized viewers ? My idea was to use VB...


The easiest way is to implement your code as classes in a VB6 ActiveX
exe. Your VBA code can then have a reference to the project,
instantiate those classes and run the code in them.

I'm sure there are examples of doing this online, but I don't know of
any off the top of my head. It is one of the topics we cover in
'Professional Excel Development', due out in January.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com