Program currently uses hard coded file paths and dbCurr with destinationptt as string. But would like to remove the hard coded file paths so program can run anywhere.
Asked
Active
Viewed 160 times
1 Answers
0
What you are looking for are relative paths. You can get the Path of your Project by:
CurrentProject.Path
You can than add some string like
CurrentProject.Path & "\folder\file.txt"
You also can go up a layer by using \..\
CurrentProject.Path & "\..\file.txt"
For more information take a look at these posts:

sporc
- 387
- 1
- 4
- 14
-
Thanks. So we need to dim the path? – Joep82 Jan 12 '18 at 11:51
-
CurrentProject.Path is a built in function. So you can reference any folder or path relative to your application. – Albert D. Kallal Jan 12 '18 at 18:56