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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open Statement

Status
Not open for further replies.

wlaflamme

Technical User
Aug 1, 2003
22
0
0
US
Sorry new with VB and this might be simple or impossible!!!I am trying to use a relative path in an open statemnet to link setup variable to a text file and i dont want it to be an absolute path? How do i do this?
 
Dim intFile as Integer

intFile = FreeFile
Open "..\..\..\Folder1\Folder2\Filename.txt" For Output As IntFile
Print #IntFile, "Test Text"
Close intFile

Hope this helps!

Andy
"Logic is invincible because in order to combat logic it is necessary to use logic." -- Pierre Boutroux
"Why does my program keep showing error messages every time something goes wrong?"
 
You may also want to look at App.Path property

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top