+ Reply to Thread
Results 1 to 5 of 5

Cell text to filename (again)

  1. #1
    Registered User
    Join Date
    01-14-2005
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    32

    Unhappy Cell text to filename (again)

    I am an excel newbie creating a form in Excel.

    In cell A1 I have a formula that concatenates the date in numerical format with another cell on the form.

    I have a button on the form that I want to link to a macro that will automatically "save as" and change the file name to the result of the formula in cell A1.

    I have searched the forum and read several posts but have not yet found the answer.

    Anyone?

  2. #2
    Forum Contributor
    Join Date
    04-30-2004
    Posts
    122
    Depends on where you want to save it. You need to specify a filepath unless you want it to save to My Documents everytime. Here's something to get you started.


    fname = Range("A1").Value
    ActiveWorkbook.SaveAs Filename:=fname

  3. #3
    Registered User
    Join Date
    01-14-2005
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    32
    Thanks! I really appreciate it!

    I want it to be saved to a folder on the desktop called "Transfers"

    How would I do that?

  4. #4
    Forum Contributor
    Join Date
    04-30-2004
    Posts
    122
    Keep in mind that PRC6038 is my user name. You will need to insert your user name over mine in order for it to work.



    On Error GoTo fEnd
    fPath = "C:\Documents and Settings\PRC6038\Desktop\Transfers\"
    i = Range("A1").Value
    ActiveWorkbook.SaveAs Filename:=fPath & i

    fEnd:
    End


    Hope this helps!

  5. #5
    Registered User
    Join Date
    01-14-2005
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    32
    Fantastic! Thanks.

+ 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