Microsoft Excel

Excel und VBA: Formeln, Programmierung, Lösungen

Die Excel/VBA-Beispiele

Thema

Suche im Internet in Herbers Excel-Archiv

Gruppe

Internet

Problem

Wie kann ich Herbers Excel-Archiv im Internet durchsuchen?

Lösung
Den nachstehenden Code in den genannten Modulen platzieren.

StandardModule: Modul1

Sub CallWWW()
   frmWWW.Show
End Sub

   

ClassModule: frmWWW

Private Sub cmdCancel_Click()
   Unload Me
End Sub

Private Sub WebBrowser1_NavigateComplete2( _
   ByVal pDisp As Object, URL As Variant)
   Me.Caption = "Suche in Herbers Excel/VBA-Archiv"
End Sub

Private Sub UserForm_Initialize()
   Dim num As String, as_q As String, _
      as_epq As String, as_eq As String, as_oq As String
   num = Range("num").Value
   as_q = Range("as_q").Value
   as_epq = Range("as_epq").Value
   as_eq = Range("as_eq").Value
   as_oq = Range("as_oq").Value
   With WebBrowser1
      .Navigate "http://www.google.de/search?as_q=" & _
         as_q & "&num=" & num & "&hl=de&btnG=Google-Suche&as_epq=" & _
         as_epq & "&as_oq=" & as_oq & " &as_eq=" & as_eq & _
         "&lr=&as_ft=i&as_filetype=&as_qdr=all&as_occt=any&as_dt=i" & _
         "&as_sitesearch=www.herber.de"
   End With
End Sub