Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 31st, 2004, 06:23 PM
Registered User
Join Date: May 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel VBA to SQL & back to VBA


I am trying to use Excel VBA as a simple front end to my MS SQL2000 DB. I have developed allot of tools in Excel and it would be easier to maintain these and pass data from excel to SQL and back.

What I am trying to do is the following:

Request data from SQL ( have been playing around with SQL.Request but no luck so far)

Send data to SQL

and create a new record.

If someone could help it would be highly appreciated.

Old June 1st, 2004, 02:39 AM
Friend of Wrox
Join Date: Nov 2003
Location: Johannesburg, , South Africa.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky


Probably the best way to do this is to reference MS Active Data Objects from your module. You could use ADO to run SQL queries from your spreadsheet...you could also use Insert statements ect. I guess the challange here is the logic to pick the correct data to insert and update.

I could send u a sample Module that use ADO to query a DB and write it to the spread sheet. Let me know if this will be of any help


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VBA copy & paste wensmail Excel VBA 1 September 17th, 2007 11:13 PM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
VBA Code to read the structure & data of an excel alam1 Excel VBA 0 April 24th, 2007 11:39 PM
Excel VBA & SQL LouNeate Excel VBA 2 April 5th, 2007 01:28 PM
How can use sql syntax in excel vba Biggladius Excel VBA 4 October 6th, 2004 04:15 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.