+ Reply to Thread
Results 1 to 5 of 5

Name a File based on Value of a cell in a worksheet

  1. #1
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Name a File based on Value of a cell in a worksheet

    Hi I would like to name this file Motor Report and PO for CLR650-05 PO#12CJ-012 41321

    Now "CLR650-05" (Cell E3), "PO#" (Cell A6), "12CJ-012" (Cell B6) and "41321" (Cell D6) all come from cells within the workbook.
    Specifically from cells on the sheet that it is saving. I have this currently and the file saves as "Motor Report and PO of New Paperwork V1.1.xlsm 21-Feb-13 20-42-12" as the file name. I would like it to be "Motor Report and PO for CLR650-05 PO#12CJ-012 41321"

    Anyone know how to write that in to the macro?

    This is what I have for code...

    TempFileName = "Motor Report and PO for " _
    & ThisWorkbook.Name & " " _
    & Format(Now, "dd-mmm-yy h-mm-ss")

    Thanks

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Name a File based on Value of a cell in a worksheet

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Name a File based on Value of a cell in a worksheet

    Genius! Thanks!

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,496

    Re: Name a File based on Value of a cell in a worksheet

    Is this what you mean?
    Change the C:\Temp to where you want the file saved.

    Please Login or Register  to view this content.
    HTH from Sherwood Park

    AlphaFroh was faster (again) but I had it ready, so here you go.

  5. #5
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Name a File based on Value of a cell in a worksheet

    Thanks for your help as well Jolivanes!

+ 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