Bis jetzt konntet Ihr mir immer helfen, vielleicht geht dies auch jetzt ?
Die Textboxen 13 bis 20 haben feste Werte von 100,- bis 700,-
Die Textboxen 21 bis 28 soll ein Datum eingetragen werden. Soweit so gut.
Nun meine Frage : Ich möchte das eine Prüfung der Textboxen 21 bis 28 erfolgt.
Wenn in Textbox 26 bis 28 kein Datum eingetragen wurde soll der Betrag von von Textbox 17 bis 20 nicht eingetragen werden und dies ohne Fehlermeldung.Könntet Ihr mir hierbei helfen ? Wenn möglich währ super wenn eine Msg anzeige kommen würde nach Eintrag das nur die Zeile von bis eingetragen wurde.Beginn des Eintrages ist ab Zeile 60 und max bis Zeile 74. Hier mein Beispiel:
Private Sub CommandButton14_Click()
Dim lngRow As Long
Dim intIndex As Integer
With ActiveSheet
.Unprotect Password:="xxxx"
For lngRow = 60 To .Rows.Count
If Trim$(.Cells(lngRow, 1).Text) = "" Then Exit For
Next
.Cells(lngRow, 4).Value = CDbl(Me.TextBox13)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 4).Value = CDbl(Me.TextBox14)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 4).Value = CDbl(Me.TextBox15)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 4).Value = CDbl(Me.TextBox16)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 4).Value = CDbl(Me.TextBox17)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 4).Value = CDbl(Me.TextBox18)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 4).Value = CDbl(Me.TextBox19)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 4).Value = CDbl(Me.TextBox20)
.Cells(lngRow, 4).NumberFormat = "0.00"
.Cells(lngRow, 3).Value = CDate(TextBox21)
.Cells(lngRow, 3).NumberFormat = "dd/mm/yyyy"
.Cells(lngRow, 3).Value = CDate(TextBox22)
.Cells(lngRow, 3).NumberFormat = "dd/mm/yyyy"
.Cells(lngRow, 3).Value = CDate(TextBox24)
.Cells(lngRow, 3).NumberFormat = "dd/mm/yyyy"
.Cells(lngRow, 3).Value = CDate(TextBox25)
.Cells(lngRow, 3).NumberFormat = "dd/mm/yyyy"
.Cells(lngRow, 3).Value = CDate(TextBox26)
.Cells(lngRow, 3).NumberFormat = "dd/mm/yyyy"
.Cells(lngRow, 3).Value = CDate(TextBox27)
.Cells(lngRow, 3).NumberFormat = "dd/mm/yyyy"
.Cells(lngRow, 3).Value = CDate(TextBox28)
.Cells(lngRow, 3).NumberFormat = "dd/mm/yyyy"
.Protect Password:="xxxx"
End With
For intIndex = 21 To 28
Controls("TextBox" & CStr(intIndex)).Text = ""
Next
End Sub
Kann mir einer helfen?
Danke schon im voraus. Gruß Torte