mein Fehler, sorry
04.05.2015 04:18:46
Matthias
Hallo
Bitte den Code einfach ersetzen
Private Sub cmd_Speichern_Click()
Dim sName As String
Dim lngRow As Long
Dim lngColumn As Long
Application.ScreenUpdating = False
sName = ComboBox1.Text
On Error GoTo Fehler
Cells.Find(What:=sName, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If sName "" Then
lngRow = ActiveCell.Row
lngColumn = Cells(lngRow, Columns.Count).End(xlToLeft).Column
If IsDate(TextBox2.Value) Then
If Cells(lngRow, 2).Value "" Then
Cells(lngRow, 2).Value = Cells(lngRow, 2).Value & ", " & Format(TextBox2.Value, "DD/MM/ _
YYYY")
Else
Cells(lngRow, 2).Value = Format(TextBox2.Value, "DD/MM/YYYY")
End If
End If
Else
MsgBox "Bitte einen Namen eingeben"
End If
Application.ScreenUpdating = True
Unload Me
Exit Sub
Fehler:
MsgBox "Der Name " & sName & " wurde nicht gefunden"
Unload Me
End Sub
Gruß Matthias