VBA won't run on first opening of DB

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,462
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
Hi

I have a database developed using Access 2003 where I set the default file format to Access 2000 (under Tools > Options > Advanced). The database runs nicely in Access 2003 but if I try to open it using Access 2000 then the very first time I start up the database, none of the VBA code works whatsoever. It simply refuses to run.

If I shut the database and re-open it in 2000 (without changing anything) then the VBA runs perfectly. I have fiddled with all of the startup options available under 2003 but to no avail. Has anyone else come across this problem before? And if so, how do you resolve it?

Thanks in advance
Andrew
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Ok. I think I have this sorted thanks to Denis. I created a new database using the 2000 version of Access, made sure all of the references I needed were enabled, imported all of the objects from the 2003 version of the database and the problem has disappeared. I would have thought the differing versions of the MSACC.OLB (version 9 vs 11) wouldn't have been a problem given I created the database using the 2000 format - but obviously not.

Cheers
Andrew
 
Upvote 0

Forum statistics

Threads
1,214,800
Messages
6,121,641
Members
449,044
Latest member
hherna01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top