+ Reply to Thread
Results 1 to 3 of 3

Assign Cell Content As File Name

  1. #1

    Assign Cell Content As File Name

    I am attempting to create a macro that will save a workbook with the
    file name under which I save the workbook coming from the contents of
    one of the cells in the workbook. Suppose that each time the workbook
    was altered, a specific cell (A1 on Sheet1 for instance) contained the
    desired file name for that workbook. It is my goal to create a macro
    that automatically assigns said workbook a name based on the content of
    that cell. Any help would be most appreciated.


  2. #2
    Chip Pearson
    Guest

    Re: Assign Cell Content As File Name

    Try something like

    ThisWorkbook.SaveAs
    filename:=Worksheets("Sheet1").Range("A1").Text


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com




    <[email protected]> wrote in message
    news:[email protected]...
    >I am attempting to create a macro that will save a workbook with
    >the
    > file name under which I save the workbook coming from the
    > contents of
    > one of the cells in the workbook. Suppose that each time the
    > workbook
    > was altered, a specific cell (A1 on Sheet1 for instance)
    > contained the
    > desired file name for that workbook. It is my goal to create a
    > macro
    > that automatically assigns said workbook a name based on the
    > content of
    > that cell. Any help would be most appreciated.
    >




  3. #3
    jweasl
    Guest

    Re: Assign Cell Content As File Name

    How do you use that formula? I tried to figure it out and I can't seem to get
    it to work at all

    "Chip Pearson" wrote:

    > Try something like
    >
    > ThisWorkbook.SaveAs
    > filename:=Worksheets("Sheet1").Range("A1").Text
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    >
    >
    > <[email protected]> wrote in message
    > news:[email protected]...
    > >I am attempting to create a macro that will save a workbook with
    > >the
    > > file name under which I save the workbook coming from the
    > > contents of
    > > one of the cells in the workbook. Suppose that each time the
    > > workbook
    > > was altered, a specific cell (A1 on Sheet1 for instance)
    > > contained the
    > > desired file name for that workbook. It is my goal to create a
    > > macro
    > > that automatically assigns said workbook a name based on the
    > > content of
    > > that cell. Any help would be most appreciated.
    > >

    >
    >
    >


+ 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