I have a list in a spreadsheet mapped to an XML schema. I would like to export it to an xml file using a button and code. However, I keep getting the error "Method 'Export' of object 'XmlMap' failed". This happens using the code generated from recording the process as a macro:
' Macro1 Macro
' Macro recorded 11/27/2006
' Keyboard Shortcut: Ctrl+Shift+O
ActiveWorkbook.XmlMaps("BloombergFXRates").Export URL:= _
In other words, if I do the steps manually (right-click on the list, select XML...Export, and select the file path) it works fine. But if I record it as a macro or try to call the code from a button Click event, I get the run-time error above.