+ Reply to Thread
Results 1 to 3 of 3

Get the name of the workbook that you open

  1. #1
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Get the name of the workbook that you open

    Hi!

    So did a little internet searching and made this code.

    Please Login or Register  to view this content.
    Works great.
    But my problem here is I want to contiue on with:
    Please Login or Register  to view this content.
    So my question is how can I get the name of the workbook that I open.
    If I use MsgBox sFilename <---- then it gives me the U:\Full\Path\Filename.xlsm But all I need is Filename and since the path is different for each file I cant just Trim the path away
    It works If I use ActiveWorkbook.Name but since I don't want the workbook I open to be activated I want to somehow use the name to define the range.

    Can some one help me with this please?

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Get the name of the workbook that you open

    Perhaps something like this:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Get the name of the workbook that you open

    Hi Andrew-R

    Thanks for the help!
    But I just figured out that I won't be using this macro....

    There's a lot info missing in the opend workbook for me to inport / update the info in the workbook this macro would be in.
    So I'll have to manuly copy stuff from one wb to the other

    But Thanks for the help!

+ 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