Hi
I am using the following code to copy and move the files which are listed in the column B of worksheet called sheet2.
It is taking considerably long time to do the operation.
Is there another quickest way of moving the files or someone can kindly optimise the following code to make it work faster.
Kind Regards,
I am using the following code to copy and move the files which are listed in the column B of worksheet called sheet2.
It is taking considerably long time to do the operation.
Is there another quickest way of moving the files or someone can kindly optimise the following code to make it work faster.
PHP:
Sub Setup4()
Application.ScreenUpdating = False
Dim myDir As String
Dim myDest As String
Dim myCell As String
Dim myCount As Single
'mycount is the starting row that the file names start at
myCount = 1
Do
'Change this to the Column you want to read
myCell = Range("B" & myCount)
'Change this to the location that the files are in
myDir = ThisWorkbook.Path
'Change this to the location the files are to be copied to
myDest = ThisWorkbook.Path & "\" & "Moment & Shear Outputs"
FileCopy myDir & "\" & myCell, myDest & "\" & myCell
myCount = myCount + 1
'Will loop until the first empty cell
Loop Until IsEmpty(Range("B" & myCount))
Application.ScreenUpdating = True
End Sub
Kind Regards,