jmenche
01-25-2010, 08:48 AM
Folks,
I have more of a conceptual question about running an SQL statement in VBA.
I have a spreadsheet that has a master data sheet and a bunch of sheets that reference it. The user is allowed to change parameters and refresh the sheets. In the past, I have built pivottables and run code to change the pivots. This is easy to do but can lead to file size problems. I toyed with using external data queries but I cannot send the file to someone not on my network because the query's path references my network and craps out.
Short story long, I would love to execute an SQL statement in VBA to query one sheet and return the results to another sheet.
Can someone provide me some generic advice on how to do this? I'm good with details so a very simple code example of how to do this would be appreciated.
Thanks
:beerchug:
I have more of a conceptual question about running an SQL statement in VBA.
I have a spreadsheet that has a master data sheet and a bunch of sheets that reference it. The user is allowed to change parameters and refresh the sheets. In the past, I have built pivottables and run code to change the pivots. This is easy to do but can lead to file size problems. I toyed with using external data queries but I cannot send the file to someone not on my network because the query's path references my network and craps out.
Short story long, I would love to execute an SQL statement in VBA to query one sheet and return the results to another sheet.
Can someone provide me some generic advice on how to do this? I'm good with details so a very simple code example of how to do this would be appreciated.
Thanks
:beerchug: