View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 145
Default How can I use VBA to connect to a SQL server?

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

Tim

"Bed Guy" wrote in message
...
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