![]() |
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? |
All times are GMT +1. The time now is 11:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com