In Excel 2010, when performing a Refresh on an existing Data Connection (which is Text based from a http:// location), if there is the smallest delay in the internet connection, or the file is more than a few Kb in size, a "Downloading" dialog box appears (example below).
When running the Refresh command from a Macro (that's supposed to be updating the data behind the scenes), this dialog box gets pretty annoying as it takes screen focus from the Excel document/user. And when the data is being refreshed on a regular interval on a TV screen, it's VERY annoying.
I've tried the usual "recommendations" I've been able to find on the internet (setting DisplayAlerts to False below, etc) but the dialog box appears.
I've seen that some people use 'SendKeys' as a workaround to press the 'Cancel' button in the dialog box - and whilst this works it also causes the user to get random key presses in other applications even when Excel is not in focus.
I've even tried using a suggestion to make Excel window Always on Top (on extendoffice.com) - but this dialog box still appears in front of the Excel window.
I've tried changing the file extension (data source) between HTML, TXT and XML, but the dialog still appears. I never used to have this problem when the file was on a local drive, it seems since the source file was moved to a web server I'm getting the dialog box (so not sure if it's related to the file location or just that it takes a little bit longer to get the data).
Pressing the "?" button in the dialog box it opens the Excel Help file - so I'm assuming that Excel is making this prompt box appear.
Any other ideas that could help would be greatly appreciated. (Could Excel initiate a separate HTTP download and save the file to a temp local location, then the data connection refreshes from there?)
Thanks,
Jeff.
When running the Refresh command from a Macro (that's supposed to be updating the data behind the scenes), this dialog box gets pretty annoying as it takes screen focus from the Excel document/user. And when the data is being refreshed on a regular interval on a TV screen, it's VERY annoying.
I've tried the usual "recommendations" I've been able to find on the internet (setting DisplayAlerts to False below, etc) but the dialog box appears.
Code:
[COLOR=#000000][FONT=inherit]Application[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]ScreenUpdating [/FONT][/COLOR][COLOR=#666600][FONT=inherit]=[/FONT][/COLOR][COLOR=#006666][FONT=inherit]False[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
Application[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]DisplayAlerts [/FONT][/COLOR][COLOR=#666600][FONT=inherit]=[/FONT][/COLOR][COLOR=#006666][FONT=inherit]False[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
ActiveWorkbook[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]Connections[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([/FONT][/COLOR][COLOR=#008800][FONT=inherit]"DataConnection"[/FONT][/COLOR][COLOR=#666600][FONT=inherit]).[/FONT][/COLOR][COLOR=#000000][FONT=inherit]Refresh
Application[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]DisplayAlerts [/FONT][/COLOR][COLOR=#666600][FONT=inherit]=[/FONT][/COLOR][COLOR=#006666][FONT=inherit]True[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
Application[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]ScreenUpdating [/FONT][/COLOR][COLOR=#666600][FONT=inherit]=[/FONT][/COLOR][COLOR=#006666][FONT=inherit]True
[/FONT][/COLOR]
I've seen that some people use 'SendKeys' as a workaround to press the 'Cancel' button in the dialog box - and whilst this works it also causes the user to get random key presses in other applications even when Excel is not in focus.
Code:
[COLOR=#000000][FONT=inherit]Application[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]SendKeys [/FONT][/COLOR][COLOR=#008800][FONT=inherit]"~"[/FONT][/COLOR][COLOR=#666600][FONT=inherit],[/FONT][/COLOR][COLOR=#006666][FONT=inherit]True
[/FONT][/COLOR][COLOR=#000000][FONT=inherit]
ActiveWorkbook[/FONT][/COLOR][COLOR=#666600][FONT=inherit].[/FONT][/COLOR][COLOR=#000000][FONT=inherit]Connections[/FONT][/COLOR][COLOR=#666600][FONT=inherit]([/FONT][/COLOR][COLOR=#008800][FONT=inherit]"DataConnection"[/FONT][/COLOR][COLOR=#666600][FONT=inherit]).[/FONT][/COLOR][COLOR=#000000][FONT=inherit]Refresh
[/FONT][/COLOR]
I've even tried using a suggestion to make Excel window Always on Top (on extendoffice.com) - but this dialog box still appears in front of the Excel window.
I've tried changing the file extension (data source) between HTML, TXT and XML, but the dialog still appears. I never used to have this problem when the file was on a local drive, it seems since the source file was moved to a web server I'm getting the dialog box (so not sure if it's related to the file location or just that it takes a little bit longer to get the data).
Pressing the "?" button in the dialog box it opens the Excel Help file - so I'm assuming that Excel is making this prompt box appear.
Any other ideas that could help would be greatly appreciated. (Could Excel initiate a separate HTTP download and save the file to a temp local location, then the data connection refreshes from there?)
Thanks,
Jeff.