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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
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,222,032
Messages
6,163,501
Members
451,839
Latest member
HonestZed

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