Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Form_Load()
Dim sPath As String
Dim sFile As String
'Change this path as required
sPath = "C:\Excel Files\"
sFile = Dir(sPath, vbDirectory)
With Me.ListView0
.View = lvwReport
.ListItems.Clear
.ColumnHeaders.Clear
End With
With Me.ListView0.ColumnHeaders
.Add , , "File Name", Me.ListView0.Width - 100, lvwColumnLeft
End With
Do While sFile <> ""
If Right(sFile, 4) = ".xls" Then
With Me.ListView0
Dim itmx As ListItem
Set itmx = ListView0.ListItems.Add(, , sFile)
End With
End If
sFile = Dir
Loop
End Sub