Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21278

Is something wrong with app.path?

$
0
0
Hi there! I am working a student attendance prog that saves the attendance to a txt file. The program uses this line to create and save the textfile.

myFile = App.Path & "\AttendanceLists\AttendanceList" & "- " & ClassName.Text & "_" & MonthNames.Caption & " " & DayNum.Caption & " " & Year(Now) & ".txt"

as you can see, it uses app.path, and on my home computers it works fine, but on some of the school computers it gives me a path not found error.

I am puzzled over this, because the program uses app.path to load the student names from a textfile using this line.

Open App.Path & "\StudentRosters\Roster1\ClassRosterName1.txt" For Input As #iFileNo

There has NEVER been a problem loading names, but saving is sometimes a problem on the school computers. It is hard to find out what is going on, because it will save just fine on some computers, and give me a path not found error on others? Is app.path not the right thing to use?

The reason I use it is because the root drives of the computers can be all different letters. The program itself is just in a folder, so there is nothing installed, so it could be on the desktop, on a flash drive, in my documents, anywhere.

Has anyone ever come across this? Thanks.

Viewing all articles
Browse latest Browse all 21278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>