I have this problem of moving my codes around in my external drive. Everytime I plug the external drive to a new PC, a different drive is assigned and I would have path not found error in my program. I only knew about set_path=app.path which is actually referring to the path where VB6 is installed and not directory of the VB project file that I saved in. Is there any any to set the path to the local path of .vbp or .frm?

Edited 3 Years Ago by kwng

App.Path is return path of your program.
It will return path where the project is saved.
Just take a test. Create a new project and display a path of project (Msgbox App.Path) in form load event and save it. It will return path of project. Move the project to another directory and run it again, the part will changed for sure.

app.path which is actually referring to the path where VB6 is installed

it doesn't return the path where vb6 is installed but it returns the path of the project where it is saved.

there are probably two reasons
1. may be you're using default vb6 path for saving files. Thats why you are saying so . . .
2. other reason is that you used App.Path before saving the project

so finally create a small project and then save it to different drive or directory and then use it.And you will understand the concept of App.Path

hope this helps you . . .

hi , I have a problem to set path of ms-access file in network in vb application. How to set a network path for a database in vb 6.0 so multiple users can work in same database ?
Pls. help me....

This article has been dead for over six months. Start a new discussion instead.