VBA 97 to VBA 2K/2002/2003 
Author Message
 VBA 97 to VBA 2K/2002/2003

I have a vendor supplied A97 database (that is no longer
in business) and I want to upgrade it.  Some of his VBA
code will not work in 2K.  Is there anything out there
that I can use to search through the code to find
old "stuff" or find what won't work in A2K?

Thanks,

LT



Mon, 12 Dec 2005 01:50:16 GMT  
 VBA 97 to VBA 2K/2002/2003

Quote:
> I have a vendor supplied A97 database (that is no longer
> in business) and I want to upgrade it.  Some of his VBA
> code will not work in 2K.  Is there anything out there
> that I can use to search through the code to find
> old "stuff" or find what won't work in A2K?

I can't think offhand of any A97 VBA that won't work in A2K+, provided
the correct references are set.  By default, A2K and A2K2 don't include
a reference to the DAO library, but include an ADO reference instead.
If you copy code that includes Database and Recordset objects (among
others), you should delete the reference to ADO (Microsoft ActiveX Data
Objects 2.x Library) and add one for DAO (Microsoft DAO 3.6 Object
Library).  That'll probably take care of most or all of your problems.

If you want to use both ADO *and* DAO, then you need both references,
but must disambiguate the declarations of a number of objects the two
libraries have in common;  e.g.,

    Dim rsDAO As DAO.Recordset
    Dim rsADO As ADODB.Recordset

It's just as well to make a habit of dismbiguating the declarations of
any objects from these libraries.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Mon, 12 Dec 2005 02:04:18 GMT  
 VBA 97 to VBA 2K/2002/2003

Quote:
> I have a vendor supplied A97 database (that is no longer
> in business) and I want to upgrade it.  Some of his VBA
> code will not work in 2K.  Is there anything out there
> that I can use to search through the code to find
> old "stuff" or find what won't work in A2K?

It further occurs to me that the original vendor may have been using
code or defined constants from Access versions even older than A97,
which were deprecated in A97 and now are no longer supported at all.  I
don't know what these are, though.  The only way I can think of to
discover these is to compile the database and see what errors are
highlighted.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Mon, 12 Dec 2005 02:17:03 GMT  
 VBA 97 to VBA 2K/2002/2003
Thanks, that did it.  I am in the habit of adding both on
new projects but I spaced when trying to convert this
one...

LT.

Quote:
>-----Original Message-----


>> I have a vendor supplied A97 database (that is no longer
>> in business) and I want to upgrade it.  Some of his VBA
>> code will not work in 2K.  Is there anything out there
>> that I can use to search through the code to find
>> old "stuff" or find what won't work in A2K?

>I can't think offhand of any A97 VBA that won't work in
A2K+, provided
>the correct references are set.  By default, A2K and A2K2
don't include
>a reference to the DAO library, but include an ADO
reference instead.
>If you copy code that includes Database and Recordset
objects (among
>others), you should delete the reference to ADO

(Microsoft ActiveX Data

- Show quoted text -

Quote:
>Objects 2.x Library) and add one for DAO (Microsoft DAO
3.6 Object
>Library).  That'll probably take care of most or all of
your problems.

>If you want to use both ADO *and* DAO, then you need both
references,
>but must disambiguate the declarations of a number of
objects the two
>libraries have in common;  e.g.,

>    Dim rsDAO As DAO.Recordset
>    Dim rsADO As ADODB.Recordset

>It's just as well to make a habit of dismbiguating the
declarations of
>any objects from these libraries.

>--
>Dirk Goldgar, MS Access MVP
>www.datagnostics.com

>(please reply to the newsgroup)

>.



Mon, 12 Dec 2005 04:32:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Access 97 VBA v Access 2K VBA - different ?

2. VBA code in Excel 97 vs Excel 2002

3. VBA in a workgroup template runs slower on Word 2002 than on Word 97

4. Visual Studio .Net 2003 Final Beta, simple socket code breaks between 2002 and 2003

5. vs 2002 or vs 2003 beta Nov 2002

6. VBA mailmerge problem in 2K vs 97

7. convert vba 2000 to vba 97

8. Access 2000 VBA Handbook vis a vis Access 97 VBA Handbook

9. Excel 97 VBA vs Excel 2000 VBA

10. VBA 97 vs VBA 2000

11. Office vis a vis .NET 2002 and .NET 2003

12. VS.NET 2003 project back to VS.NET 2002

 

 
Powered by phpBB® Forum Software