display all excel file in folder

  • Thread starter Thread starter ahmeddc
  • Start date Start date
A

ahmeddc

Guest
hi

I want to review all the Excel files inside a folder to listbox, noting that the Excel includes more than one version.
I used the following code and it didn't work

Dim di As New IO.DirectoryInfo("D:\EXCEL")
Dim aryFi As IO.FileInfo() = di.GetFiles("Excel Worksheets|*.xls; *.xlsx; *.xlsm")
Dim fi As IO.FileInfo
For Each fi In aryFi
ListBox1.Items.Add((fi))
Next

Continue reading...
 
Back
Top