Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey guys,

i am still making my programming language, even though i have made 4 others, this one will be more advanced, and i was wondering...how do i find the address of the module? i am making my programming language in a visual basic module and i am trying to find a file called properties.txt but i cant get it. i have tried just "properties.txt" but i cant get it. i code i have at the moment is:

VB
Dim PropertiesPath as String
PropertiesPath = "properties.txt"


i know that this isn't what it was meant to be and im new to using text files with visual basic modules. I am looking for a way to do find the path of the built module and then file a file within that folder for this to work. could you please help? thanks in advanced.
Posted

1 solution

As seen from your question it appears that you want to find the path to the file properties.txt.
For this purpose if you put the this file in the folder where the executable file of the program is there, then Application.StartupPath property can be used to get the folder of the file as shown below
VB
Dim PropertiesPath as String
PropertiesPath = Application.StartupPath & "\" & "properties.txt"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900