Error using VSTO and ImportXml when cell is being edited

D

df

Using: Excel 2003 Professional with VSTO.

I have a problem attaching an XML document to a ListObject in Excel
when one of the cells in that List is currently being edited. The List
has columns mapped to an XmlMap. Here's what the user is doing:

- User clicks into the List to edit a cell any types "Hello".
- Without clicking another cell, the user clicks a menu option.
- That menu option causes an XmlMap.ImportXml to occur on that List:

Dim map As Microsoft.Office.Interop.Excel.XmlMap =
ThisWorkbook.XmlMaps(MapName)
map.PreserveNumberFormatting = True
map.AdjustColumnWidth = False
map.PreserveColumnFilter = True
map.ImportXml(someXml)

The error is : Exception from HRESULT : 0x800A03EC

The net result is that if the user was typing in "Hello", the cell
becomes populated with the value "Hello+B:Bf"

If I select another cell in the code just before running the ImportXml,
I just get the same problem in that cell, even if the cell is not in
the List.

Spooky.
Any ideas?

Cheers,
Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top