Excel Data connections to a SQL DB
Posted on 2012-08-30
So I have an excel sheet (xlsm) that technicians use out in the field that is tied to a SQL DB through Excel's data connections populating and refreshing the tables each time it is opened. The issue I have is, when the user opens the file with no Internet connection, it times out, and then populates with questions about the data links, that the users would not understand.
So my question is, when openeing the file, I want to have a question pop up and ask if the user is on-line or off-line? If the answer is on-line, then refresh the data connections. If the user states no, then do nothing with the data connections.
I understand I need to take out the refresh data connections at opening.
So how can I do this through a VB script in the Private Sub Workbook_Open() ???