+ Reply to Thread
Results 1 to 4 of 4

Capturing Workbook Name

  1. #1
    Registered User
    Join Date
    06-04-2017
    Location
    Austin, TX
    MS-Off Ver
    2010
    Posts
    21

    Capturing Workbook Name

    I need to be able to capture the a workbook's name and then use it within the macro.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Capturing Workbook Name

    Hi Pablo,

    This line of code will give the workbook name:

    Please Login or Register  to view this content.
    If you want to capture it in a macro, you could use

    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-22-2018
    Location
    Barcelona
    MS-Off Ver
    2007
    Posts
    18

    Re: Capturing Workbook Name

    See if this is what you'r after:

    Please Login or Register  to view this content.
    This will refer to cell "A1" in the book that is open, so you can use it in another book

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Capturing Workbook Name

    Hello Pablo,

    If you are looking for a formula to put the workbook's name into cell, you can use this...
    =MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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. Capturing Data to Populate 2nd Sheet and Another Workbook
    By benjettt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2014, 12:01 PM
  2. [SOLVED] Capturing data from userform into the workbook
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-27-2013, 05:42 PM
  3. [SOLVED] Capturing open workbook as variable?
    By aaron.irvine in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2013, 04:34 AM
  4. [SOLVED] Capturing worksheet names from one workbook into one worksheet
    By MUNECA in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-08-2013, 03:30 AM
  5. Help with capturing a cell value
    By Eryn21 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2012, 10:25 AM
  6. capturing row delete
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2008, 11:10 PM
  7. capturing a number
    By pe75ne in forum Excel General
    Replies: 2
    Last Post: 06-27-2007, 08:41 AM
  8. [SOLVED] Capturing what tab was selected
    By MicroMain in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2006, 01:35 AM

Tags for this Thread

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