+ Reply to Thread
Results 1 to 2 of 2

macro to go to folder one above current folder

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    houston
    MS-Off Ver
    Excel 2003
    Posts
    1

    macro to go to folder one above current folder

    i want macro for going backwards of current folder

    like

    C:\Users\aa\Google Drive\ftr\gyth\tango.xlsm

    now i can get active workbook path by
    path=activeworkbook.path that is
    C:\Users\aa\Google Drive\ftr\gyth

    but i want to go to folder one above my active workbook folder that is

    what is macro to get this path ???
    C:\Users\aa\Google Drive\ftr

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: macro to go to folder one above current folder

    Hi pdpatel and welcome to the forum,

    Here is a User Defined Function that will give back the path one up from the one the activeworkbook is in.
    Please Login or Register  to view this content.
    Copy the above code into a VBA Module. Then in a cell you can use the function called UpPath. In a blank cell type "=UpPath()" and press enter.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. Replies: 0
    Last Post: 11-20-2014, 03:18 AM
  2. [SOLVED] Use macro to open folder for current user
    By jh51745 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2014, 11:23 AM
  3. Replies: 1
    Last Post: 03-12-2013, 04:45 AM
  4. How to use a macro to save worksheet as pdf to current folder
    By lriver2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2013, 05:03 PM
  5. Replies: 6
    Last Post: 08-11-2006, 03:41 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