VBA Import from Web Pulls Search History (when I don't want it to!)

ransomedbyfire

Board Regular
Joined
Mar 9, 2011
Messages
121
I am trying to import a little bit of information from a website. This information is contained in a table along with a drop down box that lists every stock symbol I've ever searched for. (This list gets longer every time I run the query.) So, the import ends up pulling waaay too much information and causes the one piece of information I'm after to end up in a different cell every time.

How can I stop this import from pulling my search history?

Here is the code I am using.
Code:
    Sheet12.Range("d1").ClearContents

    With Sheet12.QueryTables.Add(Connection:= _
        "URL;http://research.tdameritrade.com/public/mutualfunds/profile/profile.asp?symbol=vfinx"_
        , Destination:=Sheet12.Range("d1"))
        .WebFormatting = xlWebFormattingNone
        .WebTables = """symbolHeaderTable"""
        .Refresh BackgroundQuery:=False
    End With
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
ransomedbyfire,

Hi, what info goes to different cells? Not knowing the full code you are working with I ran the bit you provided and it clears "D1" but the rest of the down load stayed the same, however it was probably copied over.

I'm not sure what you are referring too

How can I stop this import from pulling my search history?
 
Upvote 0
Charles, thanks for your reply; but I think I may have found an easy solution. It seems like if I set Internet Explorer to refuse all cookies from TDAmeritrade, it takes care of it.
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,189
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top