Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-02-2020, 10:35 PM
zhanguoru zhanguoru is offline how to update record of activeworkbook in ADO Windows 10 how to update record of activeworkbook in ADO Office 2016
Novice
how to update record of activeworkbook in ADO
 
Join Date: Jul 2020
Posts: 1
zhanguoru is on a distinguished road
Default 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
Reply With Quote
Reply

Tags
ado

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to update record of activeworkbook in ADO 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
how to update record of activeworkbook in ADO 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft