
VB5EE installed now DAO3.0 from Excel won't work on Dev machine
Hi Patrick,
Unfortunately, I do not have the answer yet, but I do have two things I
would do to try to isolate the problem a bit.
1) Try to run similar code in your vb5. It specifically needs to
reference the DAO 3.0 Library. If the same error occurs, there may be a
problem with the Library itself.
2) Try explicitly declaring the variables like:
Dim ws as Workspace
Dim wb as Workbook
If you get a Compile error: User-defined type not defined, then you know the
reference is not working to your DAO 3.0 Library. If the same code works in
VB5, it may be Excel 97 acting up. If the same code does not work in VB5,
again you may have a problem with the DAO 3.0 Library.
Hope this helps,
Chris Glander
Excel MVP
Unlimited Resources, Inc.
Mpls., MN
*******************************************
Quote:
>Help!!
>I recently installed VB5 on my machine (I used to have VB4). Since
>installation, I can no longer use DAO 3.0 to pull data from Excel 95 vers
>7.0 on my machine, even though it is still listed in my reference box. I
>thought maybe the DAO needed to be reregister, but I tried and still had a
>problem. The larger problem is, the end users don't have 3.5 on their
>machines.
>Whenever, I switch to DAO 3.0 on my machine, I get an Object Required error
>on this:
>Set Sizeit = DBEngine.Workspaces(0) <<<<--- error occurs here
>Set Db = Sizeit.OpenDatabase(SizeDbase)
>Switching it back to 3.5 works fine. I've searched the knowledge page, but
>can't seem to find my particular problem
>Thanks in advance
>Patrick
>--