ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scope of variable (https://www.excelbanter.com/excel-programming/387269-scope-variable.html)

avi

Scope of variable
 
Hello,

I have written an EXE file in VB6 that i call from a VBA module. In
the EXE file i declared Public a variable 'aaa'. Is that variable
available in the VBA code or should i do something to make it
available?

Thanks a lot
Avi


NickHK

Scope of variable
 
Assuming you have created a standard .exe in VB6 then basically no. You
would need some other means of the communication with the app's internal
variables.
If you make an ActiveX exe (or dll for that matter), with classes and public
properties etc, then yes you can see those Public member, the same as you
can see Excel's properties, methods etc.

NickHK

"avi" wrote in message
oups.com...
Hello,

I have written an EXE file in VB6 that i call from a VBA module. In
the EXE file i declared Public a variable 'aaa'. Is that variable
available in the VBA code or should i do something to make it
available?

Thanks a lot
Avi




Bob Phillips

Scope of variable
 
No it isn't. You could write the VB6 as a DLL, expose the variable as a
property, and call that from the VBA.

--
HTH

Bob

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

"avi" wrote in message
oups.com...
Hello,

I have written an EXE file in VB6 that i call from a VBA module. In
the EXE file i declared Public a variable 'aaa'. Is that variable
available in the VBA code or should i do something to make it
available?

Thanks a lot
Avi





All times are GMT +1. The time now is 05:28 PM.

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