Quote:
Originally Posted by Bullet
When I import web data into a sheet using the VBA XMLImport method in Excel 2007, the user gets a pop up window on the spreadsheet which says "Choose the XML Map to use for this import". The window lists the three maps I've created in the workbook. If you pick the right one, the import completes normally.
But I specified the correct map name in the XMLImport statement using the ImportMap parameter. Why is Excel asking for the map name again???? If you only have one map in the workbook, it will use that map and not ask. But if you have more than one, the user has to select the correct map or cancel the import. Heeeellllllp!
|
I still have no idea why the ImportMap parameter doesn't work, but what does work is the Import method of the XmlMaps object. If you use something like :
ActiveWorkbook.XmlMaps("My_Map_Name").Import URL:=strURL, Overwrite:=True
Excel will actually use the named map without bothering the user. In this example strURL is a string I created containing the web query.