VBA to make three copies of Access database in current filepath

MikeL

Active Member
Joined
Mar 17, 2002
Messages
451
Hi,
The filepath can change monthly or depending on the user. I would like to VBA to make 3 copies of an open Access database in the current user filepath. If this wont work because the file is open, please let me know where to save the VBA code alternatively.

Thanks in advance.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,181
Office Version
  1. 365
Platform
  1. Windows
I've never tried to copy an open db because I've read that while you can, the copies won't include any locked pages (basically, batches of records are often loaded as 'pages' of records). So, if you have copies that you've manually created this way, I'd investigate thoroughly as to whether or not there are missing records in any of those copies. From what I've read this is possible via Window Scripting FileSystemObject but I would advise against it or at least suggest you ensure there are no objects open that might load pages (reports, bound forms, queries).
 

Forum statistics

Threads
1,136,773
Messages
5,677,640
Members
419,707
Latest member
Anna vib

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
Top