#1
|
|||
|
|||
how to update record of activeworkbook in ADO
how to update record of activeworkbook in ADO?
I use the code for the below,but it can not success. thanks StrCon1 = "Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties ='Excel 8.0;HDR=YES;';Data Source='" & ActiveWorkbook.FullName & "'" Con1.ConnectionString = StrCon1 Con1.Open tkSQL = "SELECT * FROM[List$]" Rst1.Open tkSQL, Con1, adOpenStatic, adLockOptimistic Debug.Print Rst1.RecordCount Do Until Rst1.EOF Rst1("Status").Value = "OK" Rst1.MoveNext Loop Rst1.Close Con1.Close ThisWorkbook.Save |
Tags |
ado |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Update Fields reverts all labels to "Next Record" | bsn321 | Mail Merge | 3 | 12-09-2016 05:21 AM |
Update a summary chart when I update a dashboard with dates | cangelis | Excel | 6 | 09-24-2014 08:08 AM |
Using ActiveWorkbook.EnvelopeVisible = True to send part of a sheet as an email. | bshawnr | Excel Programming | 1 | 04-12-2014 05:02 AM |
avoid duplicete record and merge the record with the existed record | hemant.behere | Excel | 0 | 01-10-2012 02:53 AM |
VBA code to update record in Access 2003 using Userform in Excel | primmer3001 | Excel Programming | 0 | 08-29-2011 04:25 PM |