Link to home
Start Free TrialLog in
Avatar of BKennedy2008
BKennedy2008

asked on

Excel Data connections to a SQL DB

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()   ???
Avatar of Jagdish Devaku
Jagdish Devaku

Hi,

I hope this link will help you.

http://www.ehow.com/how_8119334_connect-ms-sql-using-vbscript.html

Jagdish D.
Avatar of BKennedy2008

ASKER

The button for refresh all connections........if I knew how to trigger that, then I would be golden and not have to rewrite all the data connections and bind them to a table.

Any ides?
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, that was too easy. I just caught it myself...