As mentioned above, VB6 has been dead for many a year. If you do however still want to use it, you should maybe look at using a Rich TextBox Control where you can format the input accordingly, there are still tons of examples online -
set rich textbox format in vb6[
^]
If you only have the option to use a text box then maybe format the result typed in the text box by the user when the textbox looses focus. I have not done VB6 for a very long time but if memory serves me right your code should look something similar to -
Private Sub TextBox1_LostFocus()
Dim inputDateTime As Date
Dim formattedDateTime As String
' Try to convert the input of the user to a valid date/time...
On Error Resume Next
inputDateTime = CDate(TextBox1.Text)
On Error GoTo 0
' If input was valid by your user, format the date/time to be used in your listbox...
If inputDateTime <> #12:00:00 AM# Then
formattedDateTime = Format(inputDateTime, "mm/dd/yyyy hh:nn:ss ampm")
TextBox1.Text = formattedDateTime
Else
' Handle the invalid input...
MsgBox "Invalid date/time format. Please enter a valid date and time.", vbExclamation
TextBox1.SetFocus
End If
End Sub