I have the following code. I want to check for any ODBC or other connections and ask the user if they want to refresh when the file opens. In the debugging MsgBoxes that I have below the ThisWorkbook.Connections.Count is 0. The Len(Trim(.....)) never shows up. I then get the "This workbook contains" MsgBox. My guess is that if there are truly no connections then Connections(1) doesn't exist and throws an exception. However, if that's the case, how is it making it into the If block? ThisWorkbook.Connections.Count is 0. We've already established that through the first MsgBox. Confused.
Thanks!
Bookmarks