I have an Excel spreadsheet.
I need to execute instructions such as:
Dim dbs As database
Dim strSQL As String
Dim fld As Field
Dim rs1 As Recordset
On Error Resume Next
Set dbs = CurrentDb()
fld.Attributes = dbAutoIncrField
With tdf
.Fields.Append.CreateField(“PersonID,dbLong”)
End With
strSQL = “SELECT PersonID FROM .. ORDER … ”
DoCmd.RunSQL (strSQL)
The coding cannot be performed with a macro related to Excel.
Thank you.