I just discovered that you can use VS 2010 to create a Excel 2007 (or 2010) workbook. I can then use that to create a connection to SQL Server and code in a few queries etc and set the destination cells. I was then creating a custom ribbon that ONLY gives the user very limited access on what they can do with the document (but that's not the issue at hand). I was wondering if there was a way to pass that connection string from VB.Net excel workbook and save it in the VBA of the workbook that is being created, so that the SQL Queries can be refreshed independantly of VS2010?
↧