I am new to Visual Basic so this question may be a bit simple but it has me stumped.
I have written some visual basic code where I reference 3 text files in the same directory. When I reference the files as /filename.txt the program works but when I reference them as filename.txt the program sends up an error.
I don't understand why
HelenLF
0
Junior Poster
Recommended Answers
Jump to PostBecause, VB considers the source as <the path where your project file is> + the address of the text file relative to that path.. For e.g., "C:/Project"+"/txtfile.txt"
Jump to PostThanks for the quick reply.
The folder of files is part of a submission to a college course. When I submitted the working files - with /filename.txt - I was told that by the recipient that he couldn't open the files and that I was wrong to reference the files …
All 5 Replies
Jishnu
160
Posting Pro
HelenLF
0
Junior Poster
Jishnu
160
Posting Pro
HelenLF
0
Junior Poster
selvaganapathy
31
Posting Pro
Jishnu
commented:
Good !
+2
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.