I want to do an update in an excel sheet from a Visual Basic 6 program.
Dim strTemp As String
Dim strsql As String
Dim connExcel As ADODB.connection
Dim rs As ADODB.Recordset
strTemp = “Provider=Microsoft.Jet.OLEDB.4.0;”
strTemp = strTemp & “Data Source=” & “J:Test.xls;”
strTemp = strTemp & “Extended Properties=””Excel 8.0;HDR=Yes;IMEX=1;”””
strsql = “INSERT INTO [Bart$] VALUES(‘Testing’);”
Set connExcel = New ADODB.connection
connExcel.open strTemp
connExcel.execute strsql
connExcel.Close
Set connExcel = Nothing
I get the message that the sheet is not updatable. Why?