|
-
Dec 23rd, 2002, 10:39 PM
#1
Thread Starter
New Member
question...noobie question for professionals..
I opened a file using common dialog box..
Open " filespec.txt" for Input as #1
BLAH BLAH BLAH
Close #1
I closed the farcking file....why do i get runtime error # 55
What the farck is run time error number 55
Does that mean that the file has not been closed properly?
thanks!
Samster
-
Dec 23rd, 2002, 11:10 PM
#2
VB Code:
Dim text As String
Private Sub Command1_Click()
Open App.Path & "\filespec.txt" For Input As #1
Do Until EOF(1)
Input #1, text
Text1.text = Text1.text & text
Loop
Close #1
End Sub
Last edited by Nightwalker83; Dec 23rd, 2002 at 11:15 PM.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Dec 23rd, 2002, 11:17 PM
#3
Error 55 means 'The file is already open'.
-
Dec 23rd, 2002, 11:26 PM
#4
Lively Member
Instead of using #1, use the FreeFile method instead
VB Code:
Dim lintFileNum as Integer
lintFileNum = FreeFile
Open App.Path & "\filespec.txt" For Input As #lintFileNum
Do Until EOF(1)
Input #lintFileNum, text
Text1.text = Text1.text & text
Loop
Close #lintFileNum
- gaffa
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
|