I am looking for the VBA code to connect to a timberline database. I have an Excel workbook that queries Timberline via msquery. I have a macro that refreshes the data when run. I want to make the connection prior to the refresh and provide user id and password in the macro so the user is not prompted. Any help would be appreciated.
Well, maybe I posted in the wrong place or this wasn't difficult enough for anyone to help with but no one answered so I kept working on this and figured it out. Since 60 something people viewed it I'm posting the code in case anyone else needs it. Just modify the database location to your own. This is all on one line of code. There are no spaces even though it appears there are when I look at it in this post.
ActiveSheet.QueryTables(1).Connection = "ODBC;DSN=Timberline Data Source;UID=xxxx;PWD=xxxx;;DBQ=c:\datafolder;CODEPA GE=1252;MaxColSupport=1500;DictionaryMode=0;Standa rdMode=1;MaxColSupport=1500;ShortenNames=1;Databas eType=1;"