4

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?

Community
  • 1
  • 1
Sandesh
  • 41
  • 2
  • Me too facing the same issue to connect to database which is in sharepoint. Checked many forum and links but no solid solution for this question. – Prem May 26 '23 at 05:35

0 Answers0