Yesterday, i had a problem having text files open with a text editor, by right clicking on them and then using the open with command. I fixed the problem by using the following code:

Dim FName As String
Dim FF As Integer

If Command$ <> "" Then
FName = Replace(Command$, Chr$(34), " ")
FName = Trim$(FName)
FF = FreeFile
Open FName For Input As FF
rtfText = Input(LOF(FF), FF)
Close FF
End If

That allowed me to open text files by right clicking on them and then going to open with, and selecting my program. However, it seems that whenever i try to open certain text files, i get the following error:

Run-time error '62':
Input past end of file

I am not sure, but i think that the error could be caused by the size of the text file that i am opening. It seemed to only happen when opening larger text files, but some larger text files i was able to open. If anyone has any ideas on how i can fix this problem i could really use the help.