Your technology certification is waiting. Enroll in Cloud Class ®
Private Sub Command1_Click()
Private Sub FillFileList(byval sFolder as string)
Dim sFilename as string
list1.clear '<--- added this in case you call the sub more than once.
if Right (sFolder,1) <> "\" then sFolder = sFolder & "\"
sFilename = Dir$(sFolder & *.xls")
do until sFilename = ""
if Right(sFilename,4) <> "xlsx" then
sFilename = Dir$
Private Function ClipExt(byval fname as string) as string
Dim nPos as string
nPos = InStrRev(fname,".")
if nPos > 0 then
fname = mid(fname,1,nPos-1)
ClipExt = fname
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!