View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris Capon Chris Capon is offline
external usenet poster
 
Posts: 1
Default Creating ListObject using an XmlMap datasource.

Is it possible, using VBScript, to create a new ListObject using an XmlMap as
the data source? This can be done in the UI, but not seemingly through code.

eg:

Dim m as XmlMap
Dim l as ListObject
Dim r as Range

Set r = ActiveWorkbook.ActiveSheet.Range("A1")
Set m = ActiveWorkbook.XmlMaps("Sample_Map")
Set l = ActiveWorkbook.ActiveSheet.ListObjects.Add(xlSrcXm l, m, True, xlNo, r)

* The above code produces "Invalid procedure call or argument".