Anzeige
Archiv - Navigation
1100to1104
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

range("A1")= strText

range("A1")= strText
Michael
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Public Sub URL_Load()
Dim myIE_App As Object, strText As String
Set myIE_App = CreateObject("InternetExplorer.Application")
myIE_App.Navigate "http://www.kicker.de"
Do
Sleep 10
Loop Until myIE_App.Busy = False
strText = myIE_App.Document.documentElement.outerTEXT 'für Text
'    strText = myIE_App.Document.documentElement.outerHTML 'für HtmlCode
range("A1")= strText
Set myIE_App = Nothing
End Sub
Hallo!
Wenn ich hier range("A1")= strtext eingebe, schreibt er es nur in A1. Er soll den Text jedoch einzeln nach Trennzeichen in die nächste Celle schreiben!!!! Also weiter in A2, A3 ect.. Geht das?
Vielen Dank
Michael

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: range("A1")= strText
05.09.2009 16:16:24
Backowe
Hi,
probiere es mal so:
VBA-Code:
Public Sub URL_Load()
Dim myIE_App As Object, strText As String, Ergebnis As Variant, i As Long
Set myIE_App = CreateObject("InternetExplorer.Application")
  myIE_App.Navigate "http://www.kicker.de"
Do
    'Sleep 10
Loop Until myIE_App.Busy = False
strText = myIE_App.Document.documentElement.outerTEXT 'für Text
'    strText = myIE_App.Document.documentElement.outerHTML 'für HtmlCode
Ergebnis = Split(strText, " ")
For i = LBound(Ergebnis) To UBound(Ergebnis)
  Cells(i + 1, "A") = Ergebnis(i)
Next
Set myIE_App = Nothing
End Sub
Gruß Jürgen
Anzeige

300 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige