+ Reply to Thread
Results 1 to 2 of 2

Import XML from a URL which requires a login

Hybrid View

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Import XML from a URL which requires a login

    Hello,

    My Dev team set up a URL which I want to use to pull XML data into excel using VB.

    My problem is that the URL requires a username and password.

    I've referenced the threads that explain how to create a web query using the internet explorer object with a login and PW but I was not able to find anything about referencing an XML URL that requires a UN and PW.

    I can get this to work through the data sources function in excel, which will produce an error and prompt me for a UN/PW in the web query window. Once I enter the login information once I can run the XML link repeatedly and it will work. I'm Looking to find a workaround in VB that would ideally prompt the user for their login information (but a generic login is also possible).

    Thanks!

    My code is below:

    
    Sub GetMapping()
    
    Dim UIxml As String
    Dim CampaignID As String
    
    CampaignID = Range("D2")
    
    Sheets("XML Mapping").Select
    
    UIxml = "https://URLThatRequiresLogin/" & CampaignID & "/EndOfURL"
    
        ActiveWorkbook.XmlImport URL:= _
            UIxml, ImportMap:= _
            Nothing, Overwrite:=True, Destination:=Range("$A$1")
            
    
    End Sub

  2. #2
    Registered User
    Join Date
    03-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Import XML from a URL which requires a login

    Anyone :D ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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