Monday, 22 October 2012

How To Rename and Move A File to Another Location using Excel VBA Macro

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.,

 (:-------<Dear Users/Visitors>--------:) - Keep On Following My Blog

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts