SELECT , EXCEL.
cn.Execute "INSERT .... VALUES (" & excelcell_or_variable & ");"
/ ..
,
...
, CHAR ;
' ....
' .... "...VALUES (" & T(Q(MyStringCell)) & T(MyNumCell) & Q(MyLastTextCell) & ");"
' ....
' surrounds a string by single quotes
Private Function Q(Arg as String) As String
Q = "'" & Arg & "'"
Return
' appens a comma to a string
Private Function T(Arg as String) As String
T = Arg & ","
Return
2
, EXCEL , , ...
, source_range, 1 , INSERT . .Rows . INSERT .Cells(1, 1), .Cells(1,2).... ..
:
Sub Test()
Dim MyRange As Range, MyRow As Range
Set MyRange = Range([B4], [C8]) ' source range
For Each MyRow In MyRange.Rows ' get one row at the time from source range
Debug.Print MyRow.Cells(1, 1), MyRow.Cells(1, 2)
' replace the above by your INSERT statement
Next MyRow
End Sub