Reputation: 55
I have an excel file that I am connecting to an Access database and I am using a live connection to work with the data.
I also have a macro that edits the database (Deletes data and re-downloads it from a separate source) that needs to be run.
Currently, I cannot run my macro as the live connections are placing the DB in a read only mode. Is there a way for me to pause those live connections, run my macro, and reopen them? If there is no VBA code for this, perhaps a good code that would allow me to import query results would be helpful. Thanks!
Upvotes: 1
Views: 81
Reputation: 16015
When linking an MS Access database to an Excel workbook via a data connection, the default mode is typically Mode=Share Deny Write
, which will cause the Access database to become read-only whilst the workbook is open.
To avoid this, simply change this mode to Mode=Read
within the Connection String found within the properties of the workbook connection.
Upvotes: 1