How can I use VBA to connect to a SQL server?

G

Guest

I want to use VBA to connect to a SQL server and run a SQL command that will
return data to a pivot table. The SQL command will be generated based on a
date range entered into a couple of cells (at least that is my first thought
on how to do this). My goal is to have the user be able to enter the date
range, click refresh, and the the pivot table will be updated with that data.
I'm somewhat new to using visual basic in Excel so I'm not really sure where
to start at this point. I'm sure I haven't given out enough information at
this time and I apologize for that.

Any help is greatly appreciated!

Marc
 
T

Tim

Search the web past posts on "Sql Server" and "ADO": you should be able to
find examples.

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top