ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating ListObject using an XmlMap datasource. (https://www.excelbanter.com/excel-programming/374257-creating-listobject-using-xmlmap-datasource.html)

Chris Capon

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".



All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com