Hi all, great forum. I have been coming here on and off to lurk the questions and answers. I haven't been able to find a good answer so here goes.
I have multiple databases on a local sql server and each database corresponds to a subproject.
I'm trying to import data from certain tables -- I've been able to do that with the database connection feature of excel -- but I want to edit the data directly then update the table.
I can edit the data manually with queries, but I want to write a macro that will allow people to edit certain records without the need to learn SQL.
For example:
I have DB1 with table T1 and columns A and B with 2 records.
I've imported the table into excel, and see the table.
I want to change the value in column B then export it to the database.
Is this possible? If so, how?
I know that I can save the table in a csv file, then load the file into the database via sql queries, but that's still not simple enough.
Ideally, I'd like to find some info on how to put this all into vba:
connect to sql database
execute a select query
execute an update query.
Any direction would be nice. Thanks in advance.
Try this link ... Export data from Excel to Access (ADO) using VBA in Microsoft Excel
Contactus ut Sentio
YOUR FEEDBACK: To Say Thanks, or to leave Constructive Comments, please click on the Scales of Justice Icon at top of current post.
>Develope Good Habits with MSDN Coding Standards <>How To Add Macros & VBA Code To Your Workbooks<>Best Practices For Referencing Cells, Ranges and Sheets<
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks