I have this excel vba code
Dim cs As String
Dim sPath As String
Dim sql As String
Dim sql2 As String
Dim cn As ADODB.Connection
sPath = ThisWorkbook.Path & "\datos.accdb"
cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & sPath & ";Persist Security Info=False;"
Set cn = New ADODB.Connection
cn.Open cs
sql = "insert into tabla1 (nombre, apellido) values('" & Cells(1, 1).Value & "', '" & Cells(1, 2).Value & "')"
cn.Execute sql
cn.Close
Set cn = Nothing
this code only allows me to copy a specific cell, which I must modify so that I select a range