Dim myarray As Variant
myarray = Array("this", "is", "an", "array")
Dim file As String
Dim folderpath As String
Dim filename As String
Dim Count_files As Integer
''''''Data'''''''''''''''''''''
folderpath = "C:\Users\Guest\Desktop\myfolder\*.txt"
'''''''''''''''''''''''''''''''''''''
file = Dir(folderpath)
Count_files = 0
While (file <> "")
If Len(file) > 0 Then
filename = Left(file, Len(file) - 4)
Count_files = Count_files + 1
End If
' your code here
file = Dir
Wend
| Name | Examination |
| Mary | Pass |
| Peter | Fail |
| Kate | Fail |
| John | Pass |
| Victoria | Pass |