ich fülle eine Listbox aus Textboxen mit Click auf einem Button. Eine der Textboxen enthält ein "normales" Datum (Bsp.: 16.01.2022).
In der Spalte der Listbox soll dieses Datum nun so angezeigt werden: 2022-01-16 (yyyy-mm-dd). Wie muss mein Code aussehen, damit es so angezeigt wird?
Private Sub CommandButton_ok_Click()
Dim lngAnzahl As Long
With ListBox1
.AddItem TextBox_Auftrag.Text
lngAnzahl = ListBox1.ListCount
ListBox1.List(lngAnzahl - 1, 1) = lngAnzahl
ListBox1.List(lngAnzahl - 1, 2) = TextBox_Mandant
ListBox1.List(lngAnzahl - 1, 3) = TextBox_Lieferant
ListBox1.List(lngAnzahl - 1, 4) = TextBox_Datum
ListBox1.List(lngAnzahl - 1, 5) = "00:00:00"
ListBox1.List(lngAnzahl - 1, 6) = TextBox_find
ListBox1.List(lngAnzahl - 1, 7) = TextBox_Menge
ListBox1.List(lngAnzahl - 1, 8) = TextBox_charge
ListBox1.List(lngAnzahl - 1, 9) = TextBox_mhd
End With
End Sub