Rename Files using Codes (VBA)

I have been trying to find out a way where one can rename a file (of whatever type). I was able to do it before but never been successful in getting a comprehensive solution. I came across the following codes (I do not remember the name of the website) that can be used to change filenames one or many. This maybe useful to archive a folder with large number of files.
 

Sub Rename_File(ByVal strOldName As String, ByVal strNewName As String)
    Name strOldName As strNewName
End Sub

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: