I build many spreadsheets that require database functionality via ActiveX Data Objects. Please see code in attached file, focusing on the ConnectToSpreadsheet function. I have two issues, one new and one longstanding, as follows:
- New Issue: the code to establish the connection has always taken almost no time to run. A couple of weeks ago the code started taking 12 - 13 seconds to complete. (Click the Test button to run.) The line that takes so much time is line that opens the connection (conn.Open). This is occurring in all files that include this function. Any ideas why all of a sudden this started taking so long to complete? Could it be something in the connection string?
- Longstanding Issue: the code runs fine when the file is located in a local drive, but fails when the file is located on the Desktop or other shared or non-local drives. Any ideas how to correct this?
Any help is appreciated.
Michael Souder
Bookmarks