Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SQL Update
The following code writes to a closed workbook because its
treated like a database. However, this code only specifies the sheet to update. Is there anyway I can specify the sheet and the cell to update? Dim objConn As ADODB.Connection Dim szConnect As String Dim szSQL As String ' Create the connection string. szConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=E:\QTD\Sales.xls;" & _ "Extended Properties=Excel 8.0;" ' Create the SQL statement. szSQL = "INSERT INTO [Sheet3$] VALUES('TestValue1'); " ' Create and open the Connection object. Set objConn = New ADODB.Connection objConn.Open szConnect ' Execute the insert statement. objConn.Execute szSQL ' Close and destroy the Connection object. objConn.Close Set objConn = Nothing Thank you Todd Huttenstine |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update one worksheet tab to automatically update all other tabs? | Excel Worksheet Functions | |||
Data Validation lists update orginal cell with list update | Excel Worksheet Functions | |||
i want to update one excel file the other one update automaticaly | New Users to Excel | |||
keep value from last update and don't ask to update links | Excel Discussion (Misc queries) | |||
Date update on data update | Excel Programming |