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 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNDERSTANDING VARIABLE SCOPE -JEFF-[_2_] Excel Programming 9 August 24th 05 10:25 PM
variable scope mgasparel Excel Programming 2 February 16th 05 05:22 PM
scope/ lifetime of variable jeffP Excel Programming 5 September 19th 04 05:25 AM
Variable Scope Kevin Excel Programming 1 September 14th 04 07:05 PM
Variable scope TonyM Excel Programming 5 April 24th 04 01:02 PM


All times are GMT +1. The time now is 09:36 AM.

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

About Us

"It's about Microsoft Excel"