I have an Access 2007 database in SharePoint. I have an Excel macro which interacts with my Access database.
This works as long as both the Excel macro and Access database are in local folder or share drive, but I want to keep both Excel macro and database in SharePoint, and Excel should connect to the Access database.
Here is my code snippet.
DBPath = ThisWorkbook.Path & "\" & "Sample.accdb"
'Workbook Path is https://example.com/Sites/Sample/Sample.xlsm
Set Conn = New ADODB.Connection Conn.Mode = adModeReadWrite
sconnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & DBPath & ";Persist Security Info=False;"
This gives me an error
"Invalid File Name"
How do I connect to Access data from Excel in SharePoint?