There's a few ways. You can try this on a button or as is on the OnLoad event. Change Row Source type to Value list.
Private Sub Form_Load()
Dim LoadFiles As String
Dim strFill As String
LoadFiles = Dir$("c:\dev\*.*")
Do While LoadFiles > ""
strFill = strFill & LoadFiles & ";"
LoadFiles = Dir$
Loop
lstFiles.RowSource = strFill
End Sub
I changed the row source type to value list and added this method to the load event and replaced lstFiles with my listbox's name as well as changed the path to currentProject.path & "\
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.