View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris Chris is offline
external usenet poster
 
Posts: 16
Default copy website to worksheet

Hello all,

I want to copy a frame from a website to my excel worksheet. with some
sendkeys actions i selected the right frame, but i can't copy it.
Is there a simple way to get this done?
Here is my code i used now.

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True


'Go to this Web Page!
IE.Navigate "myURL"


'Check for good connection to web page loop!
Do
If IE.ReadyState = 4 Then
IE.Visible = False
Exit Do
Else
DoEvents
End If
Loop


'Wait for window to open!
Application.Wait (Now + TimeValue("0:00:01"))
'MsgBox "Done"
IE.Visible = True


'Send logg-on information!
'May need additional SendKeys as needed?
'Determine by the actual key-stroks needed!

Password = Sheets("blad1").Cells(2, 1).Value
Inlogname = Sheets("blad1").Cells(1, 1).Value
SendKeys (Inlogname), True
SendKeys "{TAB}", True
SendKeys (Password), True
SendKeys "{ENTER}", True
Application.Wait (Now + TimeValue("0:00:03"))
SendKeys "^{TAB}"
SendKeys "^{TAB}"
SendKeys "^{TAB}"
SendKeys "^{TAB}"
SendKeys "^{TAB}"
SendKeys "^{TAB}"

End Sub

Under the last sendkeys i tried selection.copy, but then he copy's the
selection of the worksheet and not the one from the page.
I don't know what there is wrong, but i hope someone of you can give me
hint.

Thanks Chris