|
-
Oct 28th, 2000, 12:55 PM
#1
Thread Starter
PowerPoster
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.
-
Oct 28th, 2000, 01:22 PM
#2
Hyperactive Member
Did you use the search feature on our board to try and find an answer ? 
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
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Oct 28th, 2000, 01:53 PM
#3
Hyperactive Member
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]
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|