+ Reply to Thread
Results 1 to 2 of 2

Folder path usage

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    End of the World, USA
    MS-Off Ver
    EXCEL 2007
    Posts
    111

    Folder path usage

    How do I reference a file in a macro that is in the same folder, so instead of C:/something/sometigng/abc/ababab/"files are in here" it uses /"files are in here" , the same folder, as the drive letter changes.
    Last edited by frank35; 11-18-2013 at 03:15 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Folder path usage

    The Path attribute will provide the path name of a workbook. ThisWorkbook is the workbook containing the macro being run.


    So to refer to file "myfile.xlsx" in the same folder as the file with the macro:

    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. [SOLVED] Copy files from one folder to another folder (path in textbox)
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2014, 02:45 AM
  2. Code to list the folder path and sub folder path of a specific file
    By kalai1587 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2013, 03:51 AM
  3. [SOLVED] Save As Dialog Box - Default Path and File Name, User Selects Sub Folder from Default Path
    By christenprochaska in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2012, 05:17 PM
  4. Specified folder path to select file path
    By JayEmTee91 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2012, 10:38 AM
  5. List folder path according to folder index
    By naflas in forum Excel General
    Replies: 4
    Last Post: 07-15-2010, 07:33 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