Private Sub UserForm_Initialize()Dim x As Long, FileNum As Long, TotalFile As String, Lines As Variant
FileNum = FreeFile
Open "c:\Users\History.txt" For Binary As [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum"]#FileNum[/URL]
TotalFile = Space(LOF(FileNum))
Get [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum"]#FileNum[/URL] , , TotalFile
Close [URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FileNum"]#FileNum[/URL]
Lines = Split(TotalFile, vbCrLf)
With ListBox1
For x = UBound(Lines) To 0 Step -1
.AddItem Split(Lines(x), "|")(0)
.List(.ListCount - 1, 1) = Mid(Lines(x), InStr(1, Lines(x), "|") + 1)
Next
End With
ListBox1.ColumnWidths = "0;200"
End Sub