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
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