Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

absolute to relative path 1

Status
Not open for further replies.

josoers

Programmer
May 13, 2003
17
0
0
NL
I have the following code

Dim objFSO As FileSystemObject
Dim objTS As TextStream
Dim strPath As String
Dim strLine As String
Set objFSO = New FileSystemObject

strPath = "c:\vb\files.txt"

Set objTS = objFSO.OpenTextFile(strPath, ForReading)

Do While objTS.AtEndOfStream = False

lst_vragen.AddItem (objTS.ReadLine)

Loop




how do i the get the path to the files.txt relative ?
 
strPath = App.Path & "\files.txt"


Craig

"I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day."
~Frank Sinatra
 
Well this helped us and it was super simple and super nice....thank you. Star for you!



Sera
I often believe that...
My computer is possessed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top