Refresh XML Data programmatically.

In Excel 2005 menu, there is a function called "Refresh XML Data" under menu Data/XML/.

I wonder how can I call this programmatically, so that when the worksheet is opened it will refresh the data automatically.

Thanks!




Answer this question

Refresh XML Data programmatically.

  • Ashwin Raja

    It is actually very easy to find out how UI commands correspond to Object Model calls by using Macro Recording. I just went to Tools->Macros->Record New Macro and then clicked on "Refresh XML data" then pressed ALT+F11 to open VBE, navigate to Module1 and checked out the macro that was recorded for me:

    The result was ActiveWorkbook.XmlMaps("moo_Map").DataBinding.Refresh
    And that is the answer to the original question.



  • Refresh XML Data programmatically.