The program below fails because, it seems, that I do not have the correct permissions to access the files on my local computer - and the FileOpen method requires that I have the appropriate permissions.
Dim tem As String = ""
tempno = FreeFile()
FileOpen(tempno, "c:\myvbastext\listoffilesandpaths.txt", OpenMode.Input)
i% = 0
While Not EOF(tempno)
i% = i% + 1
The error message is "Late bound calls to file system methods in the Visual Basic runtime are not permitted." and the error is described as a "SecurityException was unhandled."
Can someone please tell me exactly how to set the file permissions correctly so that I can access the file mentioned above - as well as all other files on my computer.