+ Reply to Thread
Results 1 to 8 of 8

problem concatenating the filename to the code

  1. #1
    Registered User
    Join Date
    06-08-2007
    Posts
    39

    problem concatenating the filename to the code

    Hi, can someone please advise me on how to fix this macro, (the area marked in red). I want the filename that resulted from Cells(a,11)

    "Z:\Pumps_Division\CS&A Dept\Quotations Per Customer\" 'Cells(a, 11) & ".xls"

    to be the filename in the hyperlink with added .xls extension.

    Thanks
    Sam

    Please Login or Register  to view this content.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: problem concatenating the filename to the code

    As mentioned on your original thread (now closed) at first glance you need to replace the ' with &

  3. #3
    Registered User
    Join Date
    06-08-2007
    Posts
    39

    Re: problem concatenating the filename to the code

    Quote Originally Posted by DonkeyOte View Post
    As mentioned on your original thread (now closed) at first glance you need to replace the ' with &
    When I do this, I get z:/..../.xls without the file name, that's why it was commented it.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: problem concatenating the filename to the code

    see that highlighted in red:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-08-2007
    Posts
    39

    Re: problem concatenating the filename to the code

    Quote Originally Posted by DonkeyOte View Post
    see that highlighted in red:

    Please Login or Register  to view this content.
    I did that, and that's what I got:

    Please Login or Register  to view this content.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: problem concatenating the filename to the code

    The implication then being that the cell being referenced for file name is blank.

  7. #7
    Registered User
    Join Date
    06-08-2007
    Posts
    39

    Re: problem concatenating the filename to the code

    Quote Originally Posted by DonkeyOte View Post
    The implication then being that the cell being referenced for file name is blank.
    I don't understand, I'm creating a filename which Cell(a,11) then I want to use this name add to it .xls to come up with a file name. So it will be something like this:

    R1-Ferz-00851-020909-AJ.xls

  8. #8
    Registered User
    Join Date
    06-08-2007
    Posts
    39

    Re: problem concatenating the filename to the code

    Guys, any help would be appreciated.

    As I said, I have a macro that contatenate servral cells to make a serial number (Cell 1+2+3+4) = Serial number Then in another Excel session, I want to create a file and want to name this file as the same name as the Serial number so the file name would be cell 1+2+3+4.xls

    I need help so when I create a hyperlink over the serial number is to open the serial number excel file. but I cannot seem to figure out how to put a function (cell 1+2+3+4) as a file name. See attached Example

    Thanks
    Attached Files Attached Files

+ 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