Excel Suche Wichtig

Code:
Private Sub ButOK_Click()

Dim i As Long
 
 Do
 i = i + 1
 
 If Cells(i, 1).Value = text1.Value Then
      text2.Value = Cells(i, 2).Value & " " & Cells(i, 3).Value
     Exit Do
 End If
 
 Loop Until Cells(i + 1, 1).Value = ""
   
                                    
                                    
        If text1.Text = "" Then 'Meldung keine eingabe
        MsgBox "Fehler keine eingaben getätigt.", vbExclamation, "Keine eingaben."
        End If
        
      
        
        

End Sub


Private Sub ExportAsXMLData_Click()
ActiveWorkbook.Save
MsgBox "Daten wurden gespeichert.", vbInformation, "Speichert"

A B C
Neue KSt-Nr. Alte KSt.-Nr. Langtextbezeichnung

45455454 22235 Leitung1
5555454 22254 Leitung2
22255668 66222 Leitung4
5566644 21212 Leitung5

Insgesamt sind das 121 Datensätze.
 
Code:
 Private Sub ButOK_Click()

Dim i As Long
 
 Do
 i = i + 1
 
 If CStr(Cells(i, 1).Value) = text1.Value Then
      text2.Value = Cells(i, 2).Value & " " & Cells(i, 3).Value
     Exit Do
 End If
 
 Loop Until Cells(i + 1, 1).Value = ""
   
                                    
                                    
        If text1.Text = "" Then 'Meldung keine eingabe
        MsgBox "Fehler keine eingaben getätigt.", vbExclamation, "Keine eingaben."
        End If
        
      
        
        

End Sub


Private Sub ExportAsXMLData_Click()
ActiveWorkbook.Save
MsgBox "Daten wurden gespeichert.", vbInformation, "Speichert"

Probiers mal so!
 
Endlich,

ansonsten hätte ich wohl meinen Account hier gelöscht, weil ich an sowas gescheitert wäre!

Gruß Dignsag
 
Zurück