A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & MyFilesPath & "Forecast_026FI.xlsm;" & _
"Extended Properties='Excel 12.0;HDR=YES';"
if running in source data workbook,codes like below
Set Conn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Conn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=Excel 12.0;Data Source=" & ThisWorkbook.FullName