Results 1 to 18 of 18

Thread: Excel Image Viewer and Rename its File Name

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Dear Experts

    With the following macro I am able to change Non English File Name without any problem. I do not know how to use this macro rename multiple files.
    Please help me.
    ChangeFileName(sFile, tFile)
        On Local Error GoTo errors
        Dim fs, f, s
        Set fs = CreateObject("Scripting.FileSystemObject")
        fs.MoveFile sFile, tFile
        Set f = Nothing
        Exit Sub
    errors:
        MsgBox "File: " & sFile & vbCrLf & Err.Description
        Err.Clear
    End Sub
    
    Sub test()
        Const sDir = "C:\Users\TOSHIBA\Desktop\Fotos\"
        ChangeFileName sDir & Range("B3").Value, sDir & Range("C3").Value
    End Sub
    Also the above code doesn't save the file name as "*.jpg"
    Thanking you

    Yours sincerely
    Buvanamali

  2. #2
    Quote Originally Posted by buvanamali View Post
    Dear Experts

    With the following macro I am able to change Non English File Name without any problem. I do not know how to use this macro rename multiple files.
    Please help me.
    ChangeFileName(sFile, tFile)
        On Local Error GoTo errors
        Dim fs, f, s
        Set fs = CreateObject("Scripting.FileSystemObject")
        fs.MoveFile sFile, tFile
        Set f = Nothing
        Exit Sub
    errors:
        MsgBox "File: " & sFile & vbCrLf & Err.Description
        Err.Clear
    End Sub
    
    Sub test()
        Const sDir = "C:\Users\TOSHIBA\Desktop\Fotos\"
        ChangeFileName sDir & Range("B3").Value, sDir & Range("C3").Value
    End Sub
    Also the above code doesn't save the file name as "*.jpg"
    Thanking you

    Yours sincerely
    Buvanamali
    The above Code changes non english names only for single row. I wanted to rename multiple files. please try to help me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •