Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 13th, 2007, 07:06 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default runtime error '-2147467259 (80004005)

Hi,
    i'm getting a runtime error '-2147467259 (80004005)' The XPath is not valid because either XPath syntax is incorrect or not supported by Excel.

My code is:

Sub Temp()
Dim ws As Worksheet
Dim xmap As XmlMap
Dim oList As ListObject
Dim colList As ListColumn
Dim strXPath As String

Set ws = ActiveWorkbook.Sheets("Sheet1")

Set xmap = ActiveWorkbook.XmlMaps("Taxonomy_Map")

' Create a list object.
Set oList = ws.ListObjects.Add(xlSrcRange, [A1])

' Add a column to the list.
Set colList = oList.ListColumns.Add

' Map the column to an element in an XML map.
oList.ListColumns(1).XPath.SetValue xmap, "//Level[text()]", , True

' Repeat for two more columns.
Set colList = oList.ListColumns.Add
oList.ListColumns(2).XPath.SetValue xmap, "//Taxonomy/uri/taxonomyName/versionNumber/isCurrent/taxonomyClassificationCode/definingOrg/xmlNamespacePrefix/description/updateTime/MetricDefPresList/MetricDefPres/MetricDefNum/Level/Order", , True

Set colList = oList.ListColumns.Add
oList.ListColumns(3).XPath.SetValue xmap, "//Taxonomy/uri/taxonomyName/versionNumber/isCurrent/taxonomyClassificationCode/definingOrg/xmlNamespacePrefix/description/updateTime/MetricDefPresList/MetricDefPres/MetricDefNum/Level/Order/Taxonomy/TagName", , True


End Sub


i've also tried by added 'Microsoft XML, v3.0' ,'Microsoft XML, v4.0' and 'Microsoft XML, v5.0'


Please help...

Thanks,
sonal






Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time '-2147467259 (80004005)' Arsi Excel VBA 0 August 6th, 2007 04:00 PM
runtime error '-2147467259(80004005) denkidude Visual Basic 2005 Basics 1 March 16th, 2007 06:34 AM
run time error -2147467259(80004005) JohnRS4 Pro VB 6 1 June 12th, 2006 01:44 PM
run-time error -2147467259 (80004005) paul20091968 Excel VBA 0 May 11th, 2006 01:44 AM
Error # -2147467259: Cannot open anymore tables ejan Crystal Reports 0 December 26th, 2004 03:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.