View Single Post
 
Old 04-13-2021, 02:00 PM
rollis13's Avatar
rollis13 rollis13 is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 143
rollis13 will become famous soon enough
Default

Have you tried like this:
Code:
Option Explicit
Sub copyfiles()
    Dim m      As Variant
    Dim FileName As String
    Dim FileType As String
    FileType = ".txt"
    For m = 2 To 4
        FileName = Cells(m, 1).Value
        FileCopy "C:\Users\roberto.rodriguezram\Desktop\Source\" & FileName & FileType, _
                 "C:\Users\roberto.rodriguezram\Desktop\Destination\" & FileName & FileType
    Next
End Sub
Reply With Quote