Hi Experts,
Currently this code below will give me a list of all PDF only, I want to modify the code;
1. Allow me to select a folder
2. Will list all files in the folder selected could be PDF, .xlsx, .xls, .doc. .docx or Folder name and etc
Private Sub OldName_Click()
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
Dim i As Integer
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Users\019\Desktop\DRAWING\COPY DRAWINGS")
i = 1
For Each objFile In objFolder.Files
Cells(i + 2, 2) = objFile.Name
Cells(i + 2, 4) = objFile.Path
i = i + 1
Next objFile
End Sub
Can anyone is kind to help me figure out the code to modify.
Thanks in advance,
12Rev79
Currently this code below will give me a list of all PDF only, I want to modify the code;
1. Allow me to select a folder
2. Will list all files in the folder selected could be PDF, .xlsx, .xls, .doc. .docx or Folder name and etc
Private Sub OldName_Click()
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
Dim i As Integer
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Users\019\Desktop\DRAWING\COPY DRAWINGS")
i = 1
For Each objFile In objFolder.Files
Cells(i + 2, 2) = objFile.Name
Cells(i + 2, 4) = objFile.Path
i = i + 1
Next objFile
End Sub
Can anyone is kind to help me figure out the code to modify.
Thanks in advance,
12Rev79