+ Reply to Thread
Results 1 to 3 of 3

How to shorten up folder pathway with this workbook.path

Hybrid View

bdouglas1011 How to shorten up folder... 06-17-2018, 03:02 PM
AliGW Re: How to shorten up folder... 06-17-2018, 04:34 PM
bakerman2 Re: How to shorten up folder... 06-17-2018, 07:35 PM
  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    648

    How to shorten up folder pathway with this workbook.path

    how can I shorten up this line with my 'Dir' Names I am moving and renaming a file within the same older path can I eliminate the way I have it.... some times the location changes but it will always be in the same folder.

    I have 2 directories

    EDir = Sheet24.Range("av2").Value
    EDir2 = ThisWorkbook.Path & "\TEMP\"
    this line works if i describe the path using the one below but needs to be adjust to work with my "EDir & EDir2"

     Name "C:\Users\MWD\Desktop\MDC_MD181010_OMAHA 11-2 2HM\DATABASE\OMAHA 11-2, 2HM\RawSurveys.xls" As _
        "C:\Users\MWD\Desktop\MDC_MD181010_OMAHA 11-2 2HM\TEMP\MovedRawSurveys.xls"
    I tried but it did not work

    Name "EDir \ RawSurveys.xls" As "EDir2 \ MovedRawSurveys.xls"

    Thanks
    Last edited by bdouglas1011; 06-17-2018 at 03:33 PM. Reason: added more info

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,053

    Re: How to shorten up folder pathway with this workbook.path

    You’ve marked this thread as solved - is it?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,351

    Re: How to shorten up folder pathway with this workbook.path

    In case it isn't.
    Name EDir &  "\RawSurveys.xls" As EDir2 & "MovedRawSurveys.xls"
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] New workbook not saving in desired pathway, but reamins open on desktop
    By Sgligori in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2015, 12:51 PM
  2. How to validate an input dat folder/directory path whether the path has any spaces
    By mahendra.asapu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-21-2015, 02:39 AM
  3. [SOLVED] pathway reference to file givs out of range errormsg (pathway is set as variable)
    By phila7475 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2014, 04:51 AM
  4. Skip Manual Selection of Pathway to Reference Workbook
    By SteVo556 in forum Excel General
    Replies: 1
    Last Post: 01-03-2014, 11:21 PM
  5. 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
  6. [SOLVED] Save a workbook to a folder path in textbox2 using textbox1 as filename
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2013, 03:59 AM
  7. Shorten File Path To Access Workbook
    By JimmiOO in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-24-2010, 11:26 AM

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