Results 1 to 3 of 3

Thread: ThisWorkbook.Path

  1. #1
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    15

    ThisWorkbook.Path

    I am using an XLAM file - will ThisWorkbook.Path always return the path of the XLAM file - even if I read in data from other macro embedded files? - I need to read the path of the XLAM file as I have support file in a subfolder below where the XLAM reside.
    xl2007 - Windows 7
    xl hates the 255 number

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi,

    from excel help file...

    Use this(ThisWorkbook) property to refer to the workbook that contains your macro code. ThisWorkbook is the only way to refer to an add-in workbook from inside the add-in itself. The ActiveWorkbook property doesn't return the add-in workbook; it returns the workbook that's calling the add-in.
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    15
    What I was hoping = Guess I should use help more often - thanks
    xl2007 - Windows 7
    xl hates the 255 number

Similar Threads

  1. Replies: 0
    Last Post: 09-06-2011, 01:31 AM
  2. Find Parent Folder From Given Folder / File Path
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 05-28-2011, 03:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •