+ Reply to Thread
Results 1 to 3 of 3

How do I get a value from an xml file with vba?

  1. #1
    Registered User
    Join Date
    07-09-2010
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    6

    How do I get a value from an xml file with vba?

    I am trying to learn how to use xml with vba. I want to get the value of the "Location" element in my xml file. When I run my code I get the error "Error 91, Object Variable or With not set." Below is my VBA code and my xml file. I have also made a reference to MSXML 6.0. Thanks!

    Please Login or Register  to view this content.
    Here's my xml code.


    Please Login or Register  to view this content.
    Last edited by ucchris77; 07-13-2010 at 02:14 PM.

  2. #2
    Registered User
    Join Date
    07-09-2010
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    6

    Talking Re: How do I get a value from an xml file with vba?

    Never mind, I figured it out. I was doing this completely wrong.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How do I get a value from an xml file with vba?

    Your post does not comply with Rule 9 of our Forum RULES. If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit. And please never edit a thread in which someone else has responded.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1