+ Reply to Thread
Results 1 to 3 of 3

Copy the name of a workbook as it appears in it's folder to a cell

  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    14

    Copy the name of a workbook as it appears in it's folder to a cell

    This is a small piece of code I am hoping to insert into the larger piece of code I already have. My code goes through a folder and takes a column out of each excel workbook (100+) and copies it into a summary work book. No where in each of the 100+ workbooks does a good name appear so that I know which column is from which workbook in the Summary workbook, so I am hoping to copy the actual name of each workbook and put it above the copied column in the summary workbook. For example the first workbooks name should be copied into cell C:5.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Copy the name of a workbook as it appears in it's folder to a cell

    I think you're just asking about .Name? I don't know how you're iterating through your workbooks, but if I have a workbook named Book1 open, then this code would set x equal to "Book1". make sense?

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Copy the name of a workbook as it appears in it's folder to a cell

    I am not exactly sure what you are asking for but something like the follow should work.

    Please Login or Register  to view this content.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

+ 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. Copy a Range from each workbook in a folder to another folder
    By Romina in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2015, 05:53 AM
  2. Replies: 1
    Last Post: 01-06-2015, 10:13 AM
  3. Copy a Range from each workbook in a folder to another folder
    By Romina in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-06-2015, 05:44 AM
  4. [SOLVED] VBA Code open files in folder, copy text to workbook-Next time folder opened copy only new
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 07:59 PM
  5. Copy value from cell from every workbook in a folder
    By AlexCoyne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2012, 01:13 PM

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