+ Reply to Thread
Results 1 to 2 of 2

File Name

  1. #1
    Ronbo
    Guest

    File Name

    I am trying to copy a workbook in a dir to another dir. The workbook I am
    trying to copy is not the Active Workbook. I get this to work with a fixed
    name, but I need the name to change each time to the name in Cell (M9) of the
    Active Workbook.

    Code:
    FileCopy ActiveCell, "C:\Path\Dir\"ActiveSheet.Range("M9").Value.xls""

    My problem is adding the cell M9 to the path. What am I doing wrong.

    Any help is always apprectiated.

  2. #2
    Jim Thomlinson
    Guest

    RE: File Name

    FileCopy ActiveCell, "C:\Path\Dir\" & ActiveSheet.Range("M9").Value & ".xls"

    HTH
    "Ronbo" wrote:

    > I am trying to copy a workbook in a dir to another dir. The workbook I am
    > trying to copy is not the Active Workbook. I get this to work with a fixed
    > name, but I need the name to change each time to the name in Cell (M9) of the
    > Active Workbook.
    >
    > Code:
    > FileCopy ActiveCell, "C:\Path\Dir\"ActiveSheet.Range("M9").Value.xls""
    >
    > My problem is adding the cell M9 to the path. What am I doing wrong.
    >
    > Any help is always apprectiated.


+ Reply to Thread

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