Results 1 to 7 of 7

RUN Time error,Rename PDF files using Excel Macro

Threaded View

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    chennai
    MS-Off Ver
    Excel 2007
    Posts
    31

    RUN Time error,Rename PDF files using Excel Macro

    Dear All,

    I am try to Rename Multiple PDF files with the Excel sheet Data.
    Column A -Contains ,Original PDF File Name
    Column B -Contains, to be Rename File Name
    My Pdf files were in the folder path-E:\test

    I took the Vb code from our fourm only.
    But when try to run the macro, it shows "Run time Error '53': "File Not Found.

    Please help to solve.

    Thanks In Advance.
    Sub Rename_All()
    
        Dim lastRow As Long, row As Long
        Dim path As String
        
        lastRow = Cells(Rows.Count, "A").End(xlUp).row
        For row = 1 To lastRow
            path = Left(Cells(row, "A").Value, InStrRev(Cells(row, "A").Value, "\"))
            Name Cells(row, "A").Value As path & Cells(row, "B").Value
        Next
        
    End Sub
    Attached Files Attached Files
    Last edited by arlu1201; 11-06-2012 at 09:34 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1