Creating ListObject using an XmlMap datasource.

C

Chris Capon

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(xlSrcXml, m, True, xlNo, r)

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

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