[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Question with App.path ( Visual Basic 6 and 500 Points )

Posted on 2009-04-06
1
Medium Priority
?
477 Views
Last Modified: 2012-05-06
I am using app.path to get the dir of my application. Everything is ok however i am interest to get a part of the app.path. For example my app.path is "c:\project\code" , how can i get only "c:\project" ?
0
Comment
Question by:KingSencat
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 24078393
This function should do it.
Function GetLeftPath() As String
    Dim Parts() As String
    
    Parts = Split(App.Path, "\")
    ReDim Preserve Parts(UBound(Parts) - 1)
    GetLeftPath = Join(Parts, "\")
End Function

Open in new window

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question