Version of VBA

P

pagates

Hello All,

We were investigating a problem we were having with an Excel Add-In. We had
two machines, with the same version of Office, same version of Windows, and
the same version of our Add-In. The code worked on one machine, but not the
other.

What we eventually found is that the machine where it worked had a newer
version of VBA. The first question is, how? How is VBA updated? Does it
come from Office updates? Does it matter if, say, VB6 is loaded onto a
system?

Also, is this something that can be distributed as a merge module with our
Add-In?

Is the version of VBA allowed dependant on the version of Office installed?

Thanks,
pagates
 
G

Grochu

pagates napisał(a):
Hello All,

We were investigating a problem we were having with an Excel Add-In. We had
two machines, with the same version of Office, same version of Windows, and
the same version of our Add-In. The code worked on one machine, but not the
other.
Check if all needed references to relevant libraries are enabled on the
second machine
What we eventually found is that the machine where it worked had a newer
version of VBA. The first question is, how? How is VBA updated? Does it
come from Office updates? Does it matter if, say, VB6 is loaded onto a
system?
VB6 installation rewrites some libraries responsible for VBA objects. It
adds some others too.
Also, is this something that can be distributed as a merge module with our
Add-In?
don't know
Is the version of VBA allowed dependant on the version of Office installed?
yes

regards
Grch
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?cGFnYXRlcw==?=,

Office 97 used VBA 5.0. All later versions of Office use VBA 6.0. Assuming both
machines have the same version of Office installed, they should use the same
version of VBA.

What kind of error message were you getting, and what makes you think the
version of VBA was different on the one machine, than the other?
We were investigating a problem we were having with an Excel Add-In. We had
two machines, with the same version of Office, same version of Windows, and
the same version of our Add-In. The code worked on one machine, but not the
other.

What we eventually found is that the machine where it worked had a newer
version of VBA. The first question is, how? How is VBA updated? Does it
come from Office updates? Does it matter if, say, VB6 is loaded onto a
system?

Also, is this something that can be distributed as a merge module with our
Add-In?

Is the version of VBA allowed dependant on the version of Office installed?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
P

pagates

Hi Cindy,

Both machines are Office 2000 (Version 9.0.6926 SP-3), and we are using Excel.

However, there are differences in the version of VBA (from the About box):
Machine 1: Version 8967 VBA: Retail 6.0.8714 Forms3: 2.01
Machine 2: Version 9969 VBA: Retail 6.0.8869 Forms3: 2.01

The problem we are having is with the generation of an INI file that
contains configuration information for our Add-In. Unfortunately, it is a
legacy program that is doing this via automation (I know, unsupported because
it is not visible), and it is trying to create this INI for the Default User
in Windows. We are not sure at what point this is failing, but it appears to
work correctly for the later version.

The INI gets generated when it doesn't exist, but that depends on the
Workbook_Open event being fired (which then calls various Subs and Functions,
which do various things, including generation of this INI file).

Thanks,
PAGates
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?cGFnYXRlcw==?=,
Both machines are Office 2000 (Version 9.0.6926 SP-3), and we are using Excel.

However, there are differences in the version of VBA (from the About box):
Machine 1: Version 8967 VBA: Retail 6.0.8714 Forms3: 2.01
Machine 2: Version 9969 VBA: Retail 6.0.8869 Forms3: 2.01
Does (or did) Machine 2 ever have a later version of Office installed? I'm
sitting at a machine with 2000 and 2003 installed in parallel and I see the same
Verion number as your machine 2. Retail: 6.5.8869 Forms3: 11.0.6254. And this in
the VB Editor BOTH 2000 and 2003.

What calls are you using to generate and maintain the INI files? VBA, itself,
doesn't really have any functions for that, as I recall. Word can use
System.PrivateProfileString for limited writing/reading. But I was under the
impression other Office applications needed to use the Windows API?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
P

pagates

Hi Cindy,

I don't know for sure, as these are lab test machines. However, given our
procedures, I think that it is unlikely that a newer version of Office was
loaded and unloaded, because of the version of the product that is tested on
that machine.

It could be more likely that another application was installed (and perhaps
subsequently uninstalled, or not) with a newer version of the VB Runtime
libraries. I believe that that can change the functionality of the VBA code,
but I didn't know if that could change the version that shows up in VBA.

Other possibilities are Windows Updates and Office Updates.

FYI - I am using the Win32 API for the INI file calls. I guess that the
difference could be there, as well.

Thanks,
Paul
 
M

Michael Herzfeld [MSFT]

The 9969 version of VBE is the correct version for Office 2000. I'm not
sure how one of your machines got an old build on it. One possibility is
that someone installed another product that ships VBE (such as AutoCad
or WordPerfect) that overwrote the newer version with the old one. You
might be able to fix this by either repairing your Office installation
or by going to the Office Update site and installing the latest patches
available for Office 2000.
Hope this helps...
Michael Herzfeld
Office Programmability Test Team

-----Original Message-----
From: pagates [mailto:p[email protected]]
Posted At: Thursday, January 26, 2006 7:07 AM
Posted To: microsoft.public.office.developer.vba
Conversation: Version of VBA
Subject: Re: Version of VBA

Hi Cindy,

Both machines are Office 2000 (Version 9.0.6926 SP-3), and we are using
Excel.

However, there are differences in the version of VBA (from the About
box):
Machine 1: Version 8967 VBA: Retail 6.0.8714 Forms3: 2.01
Machine 2: Version 9969 VBA: Retail 6.0.8869 Forms3: 2.01

The problem we are having is with the generation of an INI file that
contains configuration information for our Add-In. Unfortunately, it is
a
legacy program that is doing this via automation (I know, unsupported
because
it is not visible), and it is trying to create this INI for the Default
User
in Windows. We are not sure at what point this is failing, but it
appears to
work correctly for the later version.

The INI gets generated when it doesn't exist, but that depends on the
Workbook_Open event being fired (which then calls various Subs and
Functions,
which do various things, including generation of this INI file).

Thanks,
PAGates
 
Top