i wanted to update my excel using this code i have using front excel+vba back as mysql i have waiting for replys
Sub updateData()
Dim activesheet As Collection
Dim totColumns, totRows, i, j, WDS_id
Dim prBatchName, prTableQry, inTableQry, prTableQry1, dbQry
Dim rs As New ADODB.Recordset
Sheet3.Activate
prBatchName = "tblProd_AGR_007"
-----error here------
totColumns = activesheet.Cells(2, 1).CurrentRegion.Columns.Count
totRows = activesheet.Cells(2, 1).CurrentRegion.Rows.Count
dbconn.Open strConn
rs.Open "select * from " & prBatchName, dbconn, adOpenStatic, adLockOptimistic
For j = 3 To totRows
WDS_id = activesheet.Cells(j, 1)
rs.Find "WDS_ID=" & WDS_id
For i = 2 To totColumns
rs(activesheet.Cells(2, i).ID) = activesheet.Cells(j, i)
Next
rs.Update
Next
rs.Close
dbconn.Close
MsgBox "Data updated sucessfully"
End Sub
Sub updateData()
Dim activesheet As Collection
Dim totColumns, totRows, i, j, WDS_id
Dim prBatchName, prTableQry, inTableQry, prTableQry1, dbQry
Dim rs As New ADODB.Recordset
Sheet3.Activate
prBatchName = "tblProd_AGR_007"
-----error here------
totColumns = activesheet.Cells(2, 1).CurrentRegion.Columns.Count
totRows = activesheet.Cells(2, 1).CurrentRegion.Rows.Count
dbconn.Open strConn
rs.Open "select * from " & prBatchName, dbconn, adOpenStatic, adLockOptimistic
For j = 3 To totRows
WDS_id = activesheet.Cells(j, 1)
rs.Find "WDS_ID=" & WDS_id
For i = 2 To totColumns
rs(activesheet.Cells(2, i).ID) = activesheet.Cells(j, i)
Next
rs.Update
Next
rs.Close
dbconn.Close
MsgBox "Data updated sucessfully"
End Sub