Results 1 to 13 of 13

Macro to rename workbook

Threaded View

  1. #1
    Registered User
    Join Date
    12-17-2008
    Location
    Singapore
    MS-Off Ver
    2002
    Posts
    71

    Macro to rename workbook

    Hi all, Everyday I receive 20 workbooks, named as date_xxx_xxx.wk1, where xx represent some random number. Example : 09032009_23_345.wk1.
    These files are stored in a folder which contain all the files received for a month.

    I need to rename them on a daily basis. I have 3 cell in my worksheet.
    Cell A1: C:\Report ( location of the folder)
    Cell A2: 09032009 ( a search criteria for file name)
    Cell A3: mb ( location , which I can change )

    When I run the macro. It will pick up Cell A1 as the folder to work on. Followed by It will search through the folder for files name containing Cell A2. Then It is found, It will pick up the cell value B1 in the current worksheet.
    lastly it will rename the files as "Cell A2_CellA3_CellB1.xls" . For example if the cell B1 in the workbook is Car. The file name will be "09032009_mb_Car.xls".

    Or anyone know the code to rename the workbook, with the cell valueB1 for example ?
    Last edited by kaffal; 03-10-2009 at 11:46 AM.

Thread Information

Users Browsing this Thread

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

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