I am trying to get a listbox to display rows populated with the names of all files in a particular folder.
I saw a couple of posts (I think one was from Kem Tekinay), and tried to combine them and ended up with the code below.
Could someone please tell me if this looks correct and would work.
Dim f As FolderItem
Dim filetype() As String
filetype = Array(".txt",".rtf")
Dim fileext As String
Dim i As Integer
dim fileList() as FolderItem
dim folderCount as integer = f.Count
for i = 1 to folderCount
fileList.Append f.Item( i )
for i = 0 to fileList.Ubound
dim thisFile as FolderItem = fileList( i )
dim thisName as string = thisFile.Name
For Each fileext In filetype
dim thisExt as string = thisName.Right( fileext.Len )
if thisExt = fileext then
Thank you all in advance.