To go into more detail:
I have an excel file containing a bunch of part numbers. I'd like to make a macro so that if a column is equal to "YES" then search the "Specs" folder for the specifications . pdf which matches the part number in the excel sheet and then copy the .pdf in that folder to the destination folder or "Dest" folder.
UPDATED CODE Trying to understand the Loop logic what I'm looking to go through
Sub Rectangle1_Click()
Dim ws As Worksheet
Dim lRow As Long, i As Long
Dim OldPath As String, NewPath As String
Dim fso As Object
Set fso = VBA.CreateObject("Scripting.FileSystemObject")
'~~> File location
OldPath = "C:\Users\bucklej\Desktop\Spec\"
NewPath = "C:\Users\bucklej\Desktop\Dest\"
'~~> This is the workbook from where the code is running
Set ws = ThisWorkbook.Sheets("Specification Listing")
'~~> Loop through Col A
For i = 1 To 1000
Cells(i, 2).Value = Yes
Next i
fso.CopyFile(OldPath, Newpath)
End Sub