DAtum und Laufzeitfehler 13
Jörg
ich möchte in einen Form nach dem verlassen des Feldes das eingetragene Datum
weiter bearbeiten.
Mit den Regionenstellungen Deutschland klappt es wunderbar, nur wenn ich auf Niederländisch
umstelle erhalte ich als Format #0:00:0000# zurück.
Daher erhalte ich nun an der folgenden stellen einen Fehler 13.
datevalue = TextBox22.Value
im folgenden Code:
Private Sub Textbox22_AfterUpdate()
Dim datevalue As Date
Dim cancel As Boolean
datevalue = TextBox22.Value
If UserForm1.TextBox22.Value "" Then
If Check_Date(UserForm1.TextBox22) = False Then
MsgBox TranslateString("Geben Sie ein gültiges Datum im Format dd.mm.yyyy ein", " _
msg202", "GLOBAL"), vbCritical
UserForm1.TextBox22 = ""
cancel = True
Else
TextBox16.Value = Format(datevalue + 365, "mmmm") + " " + Format(datevalue + 365, " _
yyyy")
If UserForm1.CheckBox3.Value = True Then ' And TextBox24.Value = "" Then
TextBox24.Value = datevalue
TextBox23.Value = Format(datevalue + 365, "mmmm") + " " + Format(datevalue + 365, " _
yyyy")
End If
If UserForm1.CheckBox4.Value = True Then ' And TextBox13.Value = "" Then
'Kalibrierung
'Dichtheit
TextBox24.Value = datevalue
TextBox23.Value = Format(datevalue + 365, "mmmm") + " " + Format(datevalue + 365, " _
yyyy")
End If
End If
End If
End Sub
wie kann ich denn die umgehen ?Gruß Jörg