tages lang hab ich versucht, ein Suchmaschin mit einer Excel Tabelle zu verbinden, damit man in diser Tabelle nach sitmmte Item suchen kann. Ergebnis wird in zweiter Tabelle gezeigt. aber es hat bis jetzt noch nicht geklappt.
ich würde sehr dankbar sein, wenn jemand auf meine Code mal schaut, und ein paar Vorschläge geben könnte.
mein Dialog Feld ist ein UserForm mit zwei ListBox und zwei CommodBox, die Cade sind
Code:
Public result As Boolean
Private Sub CommandButton1_Click()
result = True
Hide
End Sub
Private Sub CommandButton2_Click()
result = False
Hide
End Sub
Private Sub UserForm_Initialize()
'Add list entries to List box1. The value of each
'entry matches the corresponding ListIndex value
'in the combo box.
ListBox1.AddItem "USA" 'ListIndex = 0
ListBox1.AddItem "Kanada" 'ListIndex = 1
'Use drop-down list
ListBox1.ListIndex = 0
'Add list entries to List box1. The value of each
'entry matches the corresponding ListIndex value
'in the combo box.
ListBox2.AddItem "Alle"
ListBox2.AddItem "Behälte" 'ListIndex = 0
ListBox2.AddItem "Lack" 'ListIndex = 1
ListBox2.ListIndex = 0
End Sub
und das entsprechende Modul ist :
Code:
Public inputstr As Variant( ist das richtig?)
Option Explicit
Sub FindMe()
Dim intS As Integer
Dim rngC As Range
Dim strToFind As String, FirstAddress As String
Dim wSht As Worksheet
Application.ScreenUpdating = False
intS = 1
Set wSht = Tabelle2
strToFind = inputstr
With ActiveSheet.Range("A1:C200")
Set rngC = .Find(what:=strToFind, LookAt:=xlPart)
If Not rngC Is Nothing Then
FirstAddress = rngC.Address
Do
rngC.EntireRow.Copy wSht.Cells(intS, 1)
intS = intS + 1
Set rngC = .FindNext(rngC)
Loop While Not rngC Is Nothing And rngC.Address FirstAddress
End If
End With
Application.ScreenUpdating = True
If Len(inputstr) Then
UserForm5.myString = strInput
UserForm5.Show
End If
End Sub
such Item ist von UserForm, aber such funktion ist von Modul, wie kann ich die beiden verbinden?