Results 1 to 3 of 3

Thread: [RESOLVED] extract a part of a path to a variable

  1. #1

    Thread Starter
    Lively Member elmnas's Avatar
    Join Date
    Jul 2009
    Posts
    127

    Resolved [RESOLVED] extract a part of a path to a variable

    Hello people,

    I use this code to navigate one level up


    PHP Code:
    FilePath Left(ActiveWorkbook.PathInStrRev(ActiveWorkbook.Path"\")) 
    my problem is..

    I need to go up two levels up

    here is a example here is the whole path

    C:/test/123/source

    my code make this result

    C:/test/123/

    I need to extract the number to a variable

    could someone help me ?

  2. #2
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,657

    Re: extract a part of a path to a variable

    cant you just do this after your first line?

    FilePath = Left(FilePath , InStrRev(FilePath , "\"))
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  3. #3

    Thread Starter
    Lively Member elmnas's Avatar
    Join Date
    Jul 2009
    Posts
    127

    Re: extract a part of a path to a variable

    how?

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width