I used to using ADODB.Recordset to operate worksheet with "Microsoft ActiveX Data Objects 6.1 Library".
For example:
Function Sampe()
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sql As String
sql = "SELECT * FROM [Sheet1$]"
Set conn = CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.FullName & ";Extended Properties=""Excel 12.0;HDR=YES"";"
Set rs = conn.Execute(sql)
While Not rs.EOF
'process data
rs.MoveNext
Wend
conn.Close
End Function
This code works fine in windows but would occur error "Can't find project or library" on macOS Excel 2019.
Looks like macOS didn't support ActiveX dll.
Is there any other way to use sql to operate workSheet data without ADODB?