I have a connection string:
DSN=Excel Files;
DBQ=C:\Users\matt\Desktop\myfile.xlsm;
DefaultDir=C:\Users\matt\Desktop;
DriverId=1046;
MaxBufferSize=2048;
PageTimeout=5;
ReadOnly=0;
However I want this to pick up different users paths if the file is on their machine.
I have tried the following but I am getting the error:
Cannot update. Database or object is read-only
Attempted Code:
DSN=Excel Files;
DBQ=ThisWorkbook.Worksheets("Control").Range("J1").Value;
DefaultDir=ThisWorkbook.Worksheets("Control").Range("J2").Value;
DriverId=1046;
MaxBufferSize=2048;
PageTimeout=5;
ReadOnly=0;
J1:
C:\Users\matt\Desktop\myfile.xlsm
J2:
C:\Users\matt\Desktop