Thes best place to learn about DAO is Microsoft's Developer Network. There is a lot of documentation on the subject.
VBA supports three data access technologies. DAO, ADO and RDO. Of these Microsoft recommend you use ADO, the newer of the three.
I've been trying to write a late bound Excel DAO example, but I've run into a little trouble. I've only been able to get an early bound approach working.
Sub ExampleEarly()
Dim DB As DAO.database
Dim RS As DAO.Recordset
' Connect to Excel spreadsheet and read from tab called VA.
Set DB = OpenDatabase("C:\Example\ExcelFile.xls", False, True, "Excel 8.0;HDR=Yes")
Set RS = DB.OpenRecordset("SELECT * FROM [VA$]")
'Close the recordset
RS.Close
DB.Close
Set RS = Nothing
Set DB = Nothing
End Sub
ADO can be late bound like so:
Dim cn As Object
Dim rs AS Object
Set cn = CreateObject("ADODB.Connection")
Set rs= CreateObject("ADODB.Recordset")