
Finding the path to the application
Hi Mohsen & Bob,
you should check to see if the backslash is already there, just in case the
app is in the root folder (eg C:\) ie:
strAppPath = App.Path
If right$(strAppPath,1) <> "\" Then strAppPath = strAppPath & "\"
Quote:
> Hi Mohsen,
> App.path will get you the path of your executable, but to open the files
> you will need to add the backslash character "\" to the path. For example:
> path = App.path & "\" & "MyFile.txt" or you could use "\MyFile.txt"
> Took me a while to figure that out <g>.
> Bob Henry
> > I would like to find the my to my executable during run-time. Is there
> > any way to do this in Visual Basic?
> > Basically, I want to find which directory the running executable is in
> > so that I can load some of the files that the application needs from the
> > same directory.