This code is meant to load the most recent file from an MRU list. I got it on here but seeing how Form Load is the first procedure encountered on my application and the text file loaded is the one written in the code and not the latest in the MRU list I'm guessing it doesnt work.
Please confirm if the code to load the most recent MRU is here as I was told that it is however I cant see what it is. Please explain a little. Cheers.
'MRU List collection statements (Confirm what these do).
Set m_FileTitles = New Collection
Set m_FileNames = New Collection
'Program start, call subroutines LoadMRUList and ShowMRUList to load and display the MRU list.
dlgFile.Flags = cdlOFNFileMustExist Or cdlOFNHideReadOnly Or cdlOFNLongNames
dlgFile.CancelError = True
dlgFile.Filter = "Text Files (*.txt)|*.txt|All Files " & _
dlgFile.FilterIndex = 0
'Call load and save mrulist procedures
'Load last workouthistory file
Dim myLine As String, ff As Integer
ff = FreeFile
Open App.Path & "\workouthistory.txt" For Input As #ff
Do Until EOF(ff)
Line Input #ff, myLine
List1.AddItem Replace(myLine, "-", "")
'Initiates variable for date and creates array for list of dates on file.
Dim dates(9000) As Date
Dim i As Integer: i = 9000
dates(i) = Format(Now, "dd/mm/yyyy")
lblDate = dates(i)
'Display the time with enabled timer control.
lblTime = Time
Timer1 = True