Makro um eine Funktion erweitern
22.12.2003 12:48:42
Dieter
Und zwar wenn die Suchfunktio ohne Erfolg war das in der Celle 5, drei mal
"xxx" eingetragen wird.Kann mir jemand dabei helfen den das übertrifft meine
VBA Kenntnisse bei weiten.Dank im voraus.
MfG Dieter
Private Sub CommandButton1_Click()
Dim Zusatzzahl
Titel = "Zusatzzahl"
Mldg = "Zusatzzahl eingeben"
Zusatzzahl = InputBox(Mldg, Titel)
With Sheets(1).Range(Cells(101, 2), Cells(126, 3))
Set C = .Find(Zusatzzahl, LookIn:=xlValues, LookAt:=xlWhole)
If C Is Nothing Then
MsgBox "Zusatzzahl nicht vorhanden"
Exit Sub
End If
End With
r = Cells(100, 2).End(xlUp).Row + 1
If r < 4 Then r = 5
If C(1, 1).Column = 2 Then f = 0 Else f = -1
Cells(r, 5) = C(1, f)
Cells(r, 2) = C(1, 1)
Cells(r, 3) = "ja"
End Sub