per ComboBox (Userform) soll ein Datum z.B. 01.01.2004 in eine Zelle übertragen werden. Ich bekomme in der besagten Zelle (L1) aber nur den Text "Falsch" angezeit!
Was mache ich falsch?
Danke für die Hilfe
Gruß Dieter
Private Sub CommandButton1_Click()
Range("L1").Select
ActiveCell.Value = TextBox1.Value = Format("YYYY")
Me.Hide
End Sub
Private Sub CommandButton2_Click()
Me.Hide
End Sub
Private Sub Textbox1_AfterUpdate()
If Not IsDate(TextBox1) Then
MsgBox "Kein gültiges Datum eingegeben!" & Chr(13) & Chr(13) & _
" z.B. 01.04.2004", 16, "Falsches Datum"
Exit Sub
End If
TextBox1 = Format(TextBox1, "DD/MM/YYYY")
End Sub