+ Reply to Thread
Results 1 to 3 of 3

File Path Reference to Location of Open Spreadsheet

  1. #1
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    File Path Reference to Location of Open Spreadsheet

    Hi All,

    I have a line of code in a macro that I was provided previously on this forum; It reads:

    Please Login or Register  to view this content.
    The spreadsheet for which this code is used is located in the same location as "C:\Films\". However is there a way to modify that part of the code such that it looks in the directory in which the spreadsheet is stored? Not sure if '%' signs or some such could be used???

    Cheers in Advance,

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

    Re: File Path Reference to Location of Open Spreadsheet

    Do you mean instead of

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    change This for Active if the code is not running in the same file as the shape etc... (ie ThisWorkbook = file containing code and ActiveWorkbook being just that)
    Last edited by DonkeyOte; 05-29-2009 at 07:26 AM. Reason: typo - should read "file containing code" as opposed to "code containing code"!

  3. #3
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Thumbs up Re: File Path Reference to Location of Open Spreadsheet

    Many Thanks! Worked first time!

+ 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