+ Reply to Thread
Results 1 to 4 of 4

XMLHTP Request Error - System cannot locate the resource

Hybrid View

  1. #1
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    XMLHTP Request Error - System cannot locate the resource

    Hi,

    I am trying to fetch some data from Web using a simple get request, however I am getting an error System cannot locate the resource .

    I believe it has got something to do with Cookies.

    Can anyone help me out here?

    Sub OptionChain()
        
        Dim Request As MSXML2.XMLHTTP60, Upload As String, Parsed As Object, Result, I
        
        Set Request = New MSXML2.XMLHTTP60
        
        With Request
            .Open "GET", "https://www.nseindia.com/api/liveEquity-derivatives?index=top20_contracts", False
            .setRequestHeader "Content-Type", "application/json"
            .send
            Upload = VBA.Replace(.responseText, "\", "")
        End With
            
        Set Parsed = JsonConverter.ParseJson(Upload)
    
    End Sub
    Thanks in advance,
    Deep
    Cheers!
    Deep Dave

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: XMLHTP Request Error - System cannot locate the resource

    Bump!!

    Really appreciate if I get some help here

  3. #3
    Valued Forum Contributor
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (24 H2) 64 Bit
    Posts
    1,186

    Re: XMLHTP Request Error - System cannot locate the resource

    I don't have the JSon library but, the code works for me ... i.e. I can get the JSon response in the variable "Upload".

    Do you have the required JSon parser module in your workbook?

    .
    Last edited by Haluk; 05-15-2020 at 05:28 AM.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: XMLHTP Request Error - System cannot locate the resource

    Hi,

    Thanks for responding..

    Very strange that you can get the response in the Upload variable.

    I cant get it past the .send line.

    The code errors out right here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Resource Request - Daily Data Pull and Compare
    By crobinson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2019, 09:37 PM
  2. [SOLVED] Command Button vs ActiveX Button Causing System Resource Drain
    By Logit in forum Excel General
    Replies: 0
    Last Post: 02-13-2019, 11:49 AM
  3. Request = to locate the 5 letters in each line of draw in the 10 positions
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-07-2017, 02:40 PM
  4. How to Hyperlink Resource Drive Auto update for Resource File.
    By Saikrishna12345 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2015, 03:19 AM
  5. Outlook Automated File Request System Using VBA
    By sonny.thind in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2011, 04:02 PM
  6. excel causing system to be in low system resource
    By inenewbl in forum Excel General
    Replies: 0
    Last Post: 04-05-2005, 12:06 PM
  7. Help-System Resource Warning
    By Greenbar1 in forum Excel General
    Replies: 0
    Last Post: 04-01-2005, 04:51 PM

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