Advertisement

09.15.2004 at 03:37AM PDT, ID: 21131736
[x]
Attachment Details

VBA: Adding/Removing reference files upon startup

Asked by rusco in Microsoft Access Database

Tags: , , , ,

Hi experts!

I seem to have gotten a problem with regards to reference files. I have an access 2000 program that will get data from an excel file. Only problem is some of my users are using Excel 2000 while the others are using Excel 2002.

The reference file is different for both versions (Excel.exe for 2002, Excel9.olb for 2000). I was trying to add/remove the reference files dyanamically (upon load of the access program - this is because some of the users may upgrade to Excel 2002 in the near future) but I always get a compile error (User defined type not defined) upon load since the reference file is not set up yet. Is there a way to get my VBA code of setting up the reference files to be be called up first or should I just make two programs instead? (One with reference for Excel 2002, another with reference for Excel 2000).

Thanks!Start Free Trial
[+][-]09.15.2004 at 03:47AM PDT, ID: 12063068

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: vba, startup, reference, add, adding
Sign Up Now!
Solution Provided By: bruintje
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32