-
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.
-
Did you use the search feature on our board to try and find an answer ? :rolleyes:
Try something like this this . Remember "EOF" End Of File
Code:
Open App.Path & "\fonts.dat" For Input As #1
While Not EOF(1)
Input #1, strFont$
Call cmbFonts.AddItem(strFont$)
Wend
Close #1
[]P
-
Hi,
do you need to open the file "For Input"?
I had the same problem when use As Input when making a program to read the password of Access 2000 in some Databases and the problem was gone when i open the file using "For Binary".
Hope this can help,
Saludos...;)
[Edited by D12Bit on 10-28-2000 at 04:07 PM]