App.Path

Using App.Path provides the full path of the folder where your program is running from. This can be really handy if you have a textfile in the same folder as your program. If my textfile is called data.txt then I could use App.Path & "\data.txt" to join the current folder of my project to the filename to get the full file path of my textfile.

Example : If my program is in the folder D:\Projects\Programming\ShoppingList and my textfile is called list.txt then:

App.Path = D:\Projects\Programming\ShoppingList

App.Path & "\list.txt" = D:\Projects\Programming\ShoppingList\list.txt 


VB6 Example

Dim strFilePath As String

strFilePath = App.Path & "\myFile.txt"