Execute code for an Excel spreadsheet - TechRepublic
General discussion
March 9, 2003 at 08:55 PM
hurdk

Execute code for an Excel spreadsheet

by hurdk . Updated 23 years, 3 months ago

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.

This discussion is locked

All Comments