From: John M on
I am trying to get an XLT to use an XmlMaps
ActiveWorkbook."Root_Map").Databinding.LoadSettings(...xml) in a
Workbook_Open routine to use an xml file so that I can do a Refresh to load
the current data in the xml file but it errors indicating Method '_Default'
of object 'XmlMaps' failed. The XLT is mapped and I can do a manual refresh
and it works, but I want it to do it anytime the workbook is opened. Does
Anyone have a solution or suggestion on how to make this work? Thanks.
From: John M on
The solution that I found was to include in the open routine
'Application.Workbooks(1).Activate' before the Databinding. The purpose of
what I was attempting to do, was to programatically update an XML file of
data that was mapped via XmlMaps in an XLT. Using IE to an intranet site to
display the XLT file would launch Excel 2003 and on the Workbook_Open routine
load the updated data into the workbook (read only). This now works!

"John M" wrote:

> I am trying to get an XLT to use an XmlMaps
> ActiveWorkbook."Root_Map").Databinding.LoadSettings(...xml) in a
> Workbook_Open routine to use an xml file so that I can do a Refresh to load
> the current data in the xml file but it errors indicating Method '_Default'
> of object 'XmlMaps' failed. The XLT is mapped and I can do a manual refresh
> and it works, but I want it to do it anytime the workbook is opened. Does
> Anyone have a solution or suggestion on how to make this work? Thanks.