troubleshooting Question

Going Through My Code With A Comb

Avatar of Ryan Bayne
Ryan BayneFlag for United Kingdom of Great Britain and Northern Ireland asked on
4 Comments1 Solution334 ViewsLast Modified:
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, "-", "")
Close #ff

'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

End Sub

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros