Pasting IE data into excel without selecting location

timfran87

New Member
Joined
Mar 14, 2013
Messages
8
I am trying to paste data that is copied from an opened IE window into cell A1 on Sheet1 of this file. I want to be able to do it without selecting it though. Reason being, I am going to be manipulating another file while this one is running and while I am selecting and modifying cells it prevents this program from selecting the destination location and ends up messing up the macro. Here is a copy of my code. Any ideas how to get it to paste the copied IE data into A1 on Sheet1 without selecting the cell?

Sub Test()

Sheet1.Cells.ClearContents

Dim ie As Object
Dim Website

Website = "http://home.thermatru.com/Reports/L...cmdSubmit=get+data&mm=11&dd=22&yy=2000&cinput="

Set objWSS = CreateObject("WScript.Shell")
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Visible = True
.Navigate Website
Do While .Busy: DoEvents: Loop
Do While .ReadyState <> 4: DoEvents: Loop

ie.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT
ie.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
ie.Quit

Range("A1").Select <<<< Do this without selecting it
Sheet1.Paste

Sheet1.Pictures.Delete
End With

End Sub
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,215,566
Messages
6,125,589
Members
449,237
Latest member
Chase S

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