How can I use VBA to connect to a SQL server?
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
|