I have a Excel 2007 workbook with 5 worksheets that need to be populated with data from Oracle. In each worksheet I have created the SQL from references of data in other worksheets. I do not know of a way to execute the SQL listed in the cell via VB so I just created seperate data connections for each worksheet and I will just copy and paste the SQL from the cell into each .odc file. The problem I am having is that the connection and refresh is not pulling the SQL command set from the .odc file each time it is run. So if I change the SQL in the .odc file it uses what was initially loaded the first time. I have the connection option set to always use the connection file and I have the file location added as a trusted source. Any ideas on how to resolve Excel not reading the SQL command set from the .odc file each time I refresh or can anyone assist me in creating the correct VB to use the SQL text from a cell to populate the worksheet? Thanks!
Bookmarks