version number and references ("xx").major

  • Thread starter Thread starter George
  • Start date Start date
G

George

I thought that the version number on the software and
references("xx").should be the same. On the XP version
of Access (and Excel) on my computer the number (or at
least the integer values) are not the same.

Can anyone help me out? I want to check the version of
the software so that I can create the proper file path
name for missing references. I am working with XP snf
2000 versions of access and excel on English and French
operating systems Windows XP and 2000.

I have the french and english sorted out but the change
in the path names between 2000 and XP has defeated me so
far. I thought if I found the .major value I would know
what version I was using (because Version is new in XP
and does not work with Access 2000). Since I am replacing
missing libraries I cannot just demand their path name -
which I could do if they were referenced.

thanks
George
 
Here is a section of the code:

'If the reference is broken, then boolAdd is set to true:

Set ref = Application.References("dao")
'check for language
If boolAdd Then
If Application.LanguageSettings.LanguageID
(msoLanguageIDInstall) = 1036 Then
Set ref = Application.References.AddFromFile
(cstrRoot & cstrComFilFr & cstrMSShare & cstrDAO)
Else
Set ref = Application.References.AddFromFile
(cstrRoot & cstrComFil & cstrMSShare & cstrDAO)
End If
boolAdd = False
End If

Set ref = Application.References("excel")
'check for version of software
If boolAdd Then
If Application.References("ACCESS").Major = 9 Then
Set ref = Application.References.AddFromFile
(cstrRoot & cstrMSOff & cstrOff10 & cstrEXL10)
Else
Set ref = Application.References.AddFromFile
(cstrRoot & cstrMSOff & cstrOff & cstrEXL)
End If
boolAdd = False
End If

------
My question arises because I thought .references
("acess").major for Access 2002 should be 10 not 9
(the .version of access 2002 is 10)

George
 
Ok, I see that you are trying to fixup a 'DAO' reference
and an 'Excel' reference. Are these working the way
you want?

Also, you talk about an 'Access' reference. You won't
be able to fixup an 'Access' reference in an Access
project: an Access project won't run if the 'Access'
reference is not correct. Are you trying to fixup an
Access project, or are you running a VB project? Or a
VBA project in a different container?

(david)
 
Back
Top