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.
Sub ListAllFiles()
Dim FName As String
Dim Path As String
Dim FCount As Integer
Path = "F:\Tek-Tips\"
FCount = 0
FName = Dir(Path & "*.*", vbNormal)
If FName = "" Then
MsgBox "There are no files in " & Path, vbInformation + vbOKOnly, "List Files"
Else
Application.ScreenUpdating = False
FCount = FCount + 1
ActiveSheet.Cells(FCount, 1).Value = FName
Do
FName = Dir
FCount = FCount + 1
ActiveSheet.Cells(FCount, 1).Value = FName
Loop Until FName = ""
Application.ScreenUpdating = True
End If
End Sub
Sub GetDirectoryListing()
Dim fso As Object, fldr As Object, oFile As Object
Dim x As Integer
Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.GetFolder(FolderPath)
For Each oFile In fldr.Files
[A1].Offset(x, 0) = oFile.Name
x = x + 1
Next
End Sub