David Evans
Active Member
I'm able to write the values of cells addressed Rows/Nos to a table with no issue, however my code to write the values from named ranges to a table don't work but don't produce any errors - what am I missing?
Here's a snippet of the code - each of the Ranges referenced is a named range in the Workbook.
Here's a snippet of the code - each of the Ranges referenced is a named range in the Workbook.
Code:
Set rs2 = New ADODB.Recordset
rs2.Open "FamilyData", cn, adOpenKeyset, adLockOptimistic, adCmdTable
With rs2
.AddNew
.Fields("Family") = Range("Relationship_Name").Value
.Fields("Model") = Range("Model_Name").Value
.Fields("DateStamp") = Range("DateTimeStamp").Value
.Fields("Fund_Count") = Range("Fund_Count").Value
.Fields("AllInc<MF_Count") = Range("AllInlessMF_Count").Value
.Update
' all records in a table
End With
Last edited: