LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default VBA in Excel - Public variables & VB 6.0 vs version 6.3 in Office

I have developed an Excel application with embedded VB code. This has run OK
in all environments from Office 2000 on W98 up to Office 2003 on WXP SP2. I
do not have VB as a separate development environment so all the code has been
developed using the embedded VB editor.

I have a German user with Office 2003 (SP2), but the version of VB appears
to be 6.0, not 6.3 as on other systems so am wondering if this is where the
following problem lies.

Up to now I have found that variables declared as Public in a module are
available to private sub code within worksheets and if set in a private sub
are available to a public sub called from the private sub. But in the VB6.0
environment above, a variable set in a private sub is not passed to a public
sub in a module.

If I include a Public declaration of the variable in both the worksheet code
and the module containing the public sub, VB 6.3 assumes there are two
independent variables instead of one common one, so that won't work. I
realise that I can pass variables when calling modules, but that will mean
changing a lot of code.

Q1: Is there a way to share variables between private and public subs within
a project which will work with VB 6.0 as well as 6.3?
Q2: Is there an upgrade to VB 6.3 which can be applied to the user's
environment?

 
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
public variables johnny Excel Discussion (Misc queries) 7 February 27th 08 03:44 PM
Public variables johnny Excel Discussion (Misc queries) 2 February 24th 08 05:05 AM
Public Variables Jerry McNabb Excel Discussion (Misc queries) 0 February 24th 08 01:26 AM
Public Variables ExcelMonkey[_190_] Excel Programming 5 February 21st 05 10:12 AM
Public Variables Les Gordon Excel Programming 2 November 11th 04 12:29 PM


All times are GMT +1. The time now is 06:51 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"