A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Switching ODBC sources in Excel 2007



 
 
Thread Tools Display Modes
  #1  
Old December 29th, 2009, 10:11 PM posted to microsoft.public.excel.misc
MichaelS
external usenet poster
 
Posts: 12
Default Switching ODBC sources in Excel 2007

I use Excel 2003 extensively with ODBC and MS Query to retrieve data from an
external accounting program. Most of my worksheets have multiple external
data queries.

I recently upgraded to Excel 2007 and while I love many of the improvements
relating to external data connections, there is one thing I can't figure out.
With Excel 2003, you could use a macro to swap out or change the data
sources for multiple external queries all at once (see KB 816562). I'm
trying to determine if it's possible to do the same with Excel 2007. I can
individually edit the connection string for each external data connection to
point to a new data source but need to be able to swap them all at once.

Anyone have any ideas?
  #2  
Old December 30th, 2009, 12:51 AM posted to microsoft.public.excel.misc
bapeltzer
external usenet poster
 
Posts: 43
Default Switching ODBC sources in Excel 2007

I usually now modify ws.listobjects(1).querytable.connection rather than
ws.querytable(1).connection. You should be able to modify the 'for each'
loop in the kb article you referenced.

"MichaelS" wrote:

I use Excel 2003 extensively with ODBC and MS Query to retrieve data from an
external accounting program. Most of my worksheets have multiple external
data queries.

I recently upgraded to Excel 2007 and while I love many of the improvements
relating to external data connections, there is one thing I can't figure out.
With Excel 2003, you could use a macro to swap out or change the data
sources for multiple external queries all at once (see KB 816562). I'm
trying to determine if it's possible to do the same with Excel 2007. I can
individually edit the connection string for each external data connection to
point to a new data source but need to be able to swap them all at once.

Anyone have any ideas?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.