Hi Guys
I'm using this macro to create a list of all files in a specific folder
Sub BuildListOf_Files_to_Upload()
Extension = "*.jpg"
Folder = Range("C8").Value '"C:\images folder"
First = True
RowCount = 1
Do
If First = True Then
fName = Dir(Folder & "\" & Extension)
First = False
Else
fName = Dir()
End If
If fName <> "" Then
Range("N" & RowCount + 1) = fName
RowCount = RowCount + 1
End If
Loop While fName <> ""
End Sub
How can I improve the code so the macro will list 5 files that selected randomly?
Many thanks for your help.
Amit.
Bookmarks