Excel VBA Macro To Rename and Move A File to Another Location
Sub Rename_Move_One_File()
Dim MyFilePath As String
Dim MyTargetFolder As String
MyFilePath = "C:\Documents and Settings\Administrator\My Documents\SourceFolder\"
MyTargetFolder = "F:\TargetFolder\"
'You can change the Path and File Name
Name MyFilePath & "Sample.xlsx" As MyTargetFolder & " NewSample.xlsx"
End Sub
Thanks,Tamatam
Sub Rename_Move_One_File()
Dim MyFilePath As String
Dim MyTargetFolder As String
MyFilePath = "C:\Documents and Settings\Administrator\My Documents\SourceFolder\"
MyTargetFolder = "F:\TargetFolder\"
'You can change the Path and File Name
Name MyFilePath & "Sample.xlsx" As MyTargetFolder & " NewSample.xlsx"
End Sub
No comments:
Post a Comment
Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.