To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
MSDN Subscribers: Download the VS 2010 Release Candidate
MSDN Subscribers: Download the VS 2010 Release Candidate
Sell Your Code and Make Money?
Creating your own Tetris game using VB.NET
Article :: Improving Software Economics, Part 4 of 7: Top 10 Principles of Iterative Software Management



Go Back   VBForums > Visual Basic > Visual Basic .NET

Reply Post New Thread
 
Thread Tools Search this Thread Display Modes
Old May 23rd, 2007, 02:21 AM   #1
Abhilash007
Member
 
Join Date: Mar 07
Location: Singapore
Posts: 63
Abhilash007 is an unknown quantity at this point (<10)
Question How to find the path to the current directory where the program is located?

Hi!
I am developing a tool based on vb.net. in one of the procedures, i need the path to the folder where the tool will be located as i need to access an excel file which will be located in the same folder.

Is there any method to get this path other than getting it from the user. ??


Please advise


cheers
Abhilash
Abhilash007 is offline   Reply With Quote
Old May 23rd, 2007, 02:24 AM   #2
blackbox
New Member
 
Join Date: Apr 07
Posts: 8
blackbox is an unknown quantity at this point (<10)
Re: How to find the path to the current directory where the program is located?

Hi,
I am quite new to VB .NET.

Maybe this can help you. I am using it to load an access database from the same path where the application is:

Application.StartupPath

This will give you the path where the application is running from.

Try it out.
blackbox is offline   Reply With Quote
Old May 23rd, 2007, 03:01 AM   #3
Abhilash007
Member
 
Join Date: Mar 07
Location: Singapore
Posts: 63
Abhilash007 is an unknown quantity at this point (<10)
Re: How to find the path to the current directory where the program is located?

Hey
thx blackbox.. ill try it out

cheers
Abhilash
Abhilash007 is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic .NET


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:31 PM.




To view more projects, click here

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.