Hi all,
I have a code that moves a batch of files from one folder to another. my issue is when I try to change one of the locations to a cell reference, I end up with run time error 5.
Any help with what is likely a simple oversight would be greatly appreciated!
I have a code that moves a batch of files from one folder to another. my issue is when I try to change one of the locations to a cell reference, I end up with run time error 5.
Any help with what is likely a simple oversight would be greatly appreciated!
VBA Code:
Sub Move_Aires()
Dim FSO As New FileSystemObject
Dim WhereTo As String
Set FSO = CreateObject("Scripting.FileSystemObject")
WhereTo = Sheets("ARIES_REG").Range("D4").Value
FSO.MoveFile "P:\Servicing\are*.are", WhereTo
'FSO.MoveFile "P:\Servicing\are*.are", "P:\Servicing - 3. Batch Files\31. Aires\2022\2022.09.01\"
End Sub