Improve *Workbook.RefreshAll method
Please consider updating method RefreshAll of Workbook object by adding return value to it.
At least return 'true' when refresh went successfully, 'false' when not.
Currently, VBA ignores appearing during refresh of connections errors. However, when such refresh is triggered manually by pressing menu button (tab Data -> Refresh All), Excel shows message and a proposal to cancel refresh of remaining queries or continue.
Description of problem can be also found under following links
Kevin Osborn commented
This is a real problem. RefreshAll via VBA should return the same errors to the user that clicking RefreshAll via the data ribbon does.
Patrick Honorez commented
I suggest it should not *return* anything but at least raise an error.
I am in same boat.. refreshall should return success or failure.
David Meigel commented
My issue is similar to this: When using vb code ActiveWorkbook.RefreshAll (prompted) the file manager window appears waiting for you to select a file to import. You can either click on "Import" or "Cancel". If you hit "Cancel" code execution stops and you get a Microsoft Visual Basic message box with "Run-time error '1004' Method 'RefreshAll' of object '_Workbook' failed". Normal 'on error goto ....' handling doesn't appear to catch this. If I select "end" from the message box, my code continues running as if doing a "resume next" which is not desireable. Wish I had a solution, but I haven't found one yet.