+ Reply to Thread
Results 1 to 6 of 6

save filename found in cell that is not in values

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    save filename found in cell that is not in values

    Hi,
    Below is a code that saves the active workbook into a file which is specified in a cell. The issue here is that the filepath, in this case the filepath is found in cell H2, is not in values but rather in a vlookup formula. I tried the code in a different cell where the filepath in the cell is in values and the code works fine, but the code is having trouble reading a cell with a formula in it. I also added the words ".value" right after "& Range("H2")" in the code but that didn't either work.
    Can anybody help me on this issue?


    Please Login or Register  to view this content.
    Last edited by kosherboy; 01-16-2014 at 03:28 PM.

  2. #2
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: save filename found in cell that is not in values

    I can't duplicate your error. The code should evaluate the cell value before adding together to create the file name. Are you sure the the vlookup table has the file path correct? You may have to post a demo file.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: save filename found in cell that is not in values

    Thank you for your reply.
    Please see this attachment Book1.xlsm
    Note that if you go into the macro code and change the cell that would contain the file path from "C10" to "C15" the code will work since C15 is not in values.
    Thanks.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: save filename found in cell that is not in values

    I realized my issue. The file path is on a server, when I put a regular filepath from my computer the macro works fine even if the file is in a formula.
    I guess now my issue changed, thanks because now I know where my issue lies (although I still do not have an answer)

  5. #5
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: save filename found in cell that is not in values

    How are you refering to the server? you might need to post another example. are there spaces in the file path? Does it need enclosing in ' ' ?

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: save filename found in cell that is not in values

    Issue fixed, the file name wasn't properly named in the code. How embarrassing

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel 2008 : Save as PDF with Cell content filename
    By Eboof in forum Excel General
    Replies: 0
    Last Post: 11-03-2010, 04:27 PM
  2. VBA code: save worksheet as separate workbook; use cell values as filename
    By ACurtis802 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-17-2009, 07:23 PM
  3. Save as filename cell DETAILS!B2 value
    By alex3867 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2006, 11:22 AM
  4. [SOLVED] how do u use a cell value for the save to filename
    By mark/[email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2006, 03:43 PM
  5. [SOLVED] Save as .htm with filename from cell
    By [email protected] in forum Excel General
    Replies: 4
    Last Post: 05-13-2005, 01:07 AM

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