Add the code below to format your textboxes (you may need to change the format to your locale settings)
Private Sub TextBox7_Change()
Me.TextBox7 = Format(Me.TextBox7, "dd/mm/yyyy h:mm")
End Sub
Private Sub TextBox8_Change()
Me.TextBox8 = Format(Me.TextBox8, "dd/mm/yyyy h:mm")
End Sub
Add the following five rows to CommandButton9 and also to the Initialize event immediately following the listbox load and to any other Sub that you use to load the listbox.
Private Sub CommandButton9_Click()
ListBox1.ColumnWidths = "40;120;20;60;40;100;50;50;50;50;40;50;90;25;25" 'COLUMN WIDTHS OF LISTBOX
ListBox1.ColumnCount = 15 'Column Count Of Listbox
ListBox1.List = Sheets("Data").Range("A2:O" & Sheets("data").Cells(Rows.Count, 1).End(xlUp).Row).value
ListBox1.ListIndex = -1
TextBox14.value = ListBox1.ListCount
'*****************add these five rows*****************
Dim x As Long
For x = 0 To ListBox1.ListCount - 1
ListBox1.List(x, 7) = Format(ListBox1.List(x, 7), "dd/mm/yyyy h:mm")
ListBox1.List(x, 8) = Format(ListBox1.List(x, 8), "dd/mm/yyyy h:mm")
Next x
'*******************************************************
End Sub
please place all your declared variables immediately after Option Explicit - then run debug and correct all the errors that show.
Bookmarks