[RESOLVED] open file from the same directory the .exe is in
This is what I mean.
I have a DATA control with the property "DatabasName" set to "c:\VB_prog\MyApp\mydatabase.mdb".
The program will be installeble in a directory of user choice so how can I set the path to the same as the exe files in?
I miss the ".\mydatabase.mdb" option
Anyone has a solution to this?
/Martin
I tried to search but it's a strange search to do....
Re: open file from the same directory the .exe is in
your app directory is a constant refered to by:
vb Code:
dim mypath as string
mypath= App.Path + "\"
msgbox "your app is in " & mypath
Re: open file from the same directory the .exe is in
THANK ALOT!
That did the trick....
/Martin
Re: [RESOLVED] open file from the same directory the .exe is in
Using the Data control is a bad idea, not only does it limit what you can do, but it is also "obsolete", so will not work on many computers.
It would be much better to use ADO code instead - see the ADO Tutorial link in my signature for code which is the equivalent of a data control, but is much more flexible, and is well supported (so it will work on many more computers, and we can help you much more easily if you run into problems).