Copy paste from IE not working

Photomofo

Active Member
Joined
Aug 20, 2012
Messages
259
Hello...

I'm trying to copy a webpage and paste it to a worksheet. I'm using some standard code that I've used successfully a few times before but in this case it's not working. Basically what's happening is that I'm navigating the the webside just fine but the copy function isn't working.

I've stopped the code on the "IE.ExecWB 17, 0" step (see below), clicked on the webpage and then continued on with the code... This actually works to import the data from the webpage to the clipboard. I'm not sure why the page isn't getting automatically selected. Any suggestions.

Code:
    IE.Navigate theURL
    IE.Visible = True
    
    While IE.Busy
    DoEvents
    Wend
    
    Application.Wait DateAdd("s", Wait_Time, Now)
       
    IE.ExecWB 17, 0 '// SelectAll
    IE.ExecWB 12, 2 '// Copy selection
            
    ActiveSheet.PasteSpecial Format:="Text", link:=False, DisplayAsIcon:=False
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Here is the type of webpage I'm trying to copy.

"http://raws.wrh.noaa.gov/cgi-bin/roman/meso_base_past.cgi?stn=KFUL&unit=0&time=LOCAL&day1=1&month1=01&year1=2012&hour1=1"

Could this problem be due to the type of webpage I'm trying to copy or is this likely a browser setting issue?
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,384
Members
448,956
Latest member
JPav

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