Error 52 - Bad file name or number 
Author Message
 Error 52 - Bad file name or number

Getting this error when reading or writing sequential text files over a
network. It's apparently being caused by network timeouts. Was wondering
what the best approach was if one wanted to code around it. Can I set the
timeout used on a Line Input # or Write # statement?

example:

ff = FreeFile
Open "\\icssci20\input.txt" for input as #ff
Do While Not EOF(ff)
        Line Input #ff, sLine    <== Throwing error #52
        Debug.Print sLine
Loop
Close ff

Help!



Sun, 26 Aug 2001 03:00:00 GMT  
 Error 52 - Bad file name or number
Hi David:

Quote:
>Getting this error when reading or writing sequential text files over a
>network.

Have you tried the new FileSystemObject?  I don't recall for sure how (or
whether) it can handle UNC filenames, but perhaps it is worth a try.  Add
the Microsoft Scripting Runtime to your VB project to get the reference.

Hope this helps,

Doug.



Sun, 26 Aug 2001 03:00:00 GMT  
 Error 52 - Bad file name or number
But of course! Thank you!

Going to try non-UNC path to file as well.

Quote:

>Hi David:

>>Getting this error when reading or writing sequential text files over a
>>network.

>Have you tried the new FileSystemObject?  I don't recall for sure how (or
>whether) it can handle UNC filenames, but perhaps it is worth a try.  Add
>the Microsoft Scripting Runtime to your VB project to get the reference.

>Hope this helps,

>Doug.



Sun, 26 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Setup caused runtime error 52 - bad file name or number

2. run time error "52": bad file name or number

3. Bad file name or number error 52

4. Bad file name or number error 52

5. Run-time error '52': Bad file name or number

6. Error 52 -- bad file name or number : on double click file.

7. FileCopy Error 52 Bad FileName or number

8. error 52 invalid filename or number

9. Err 52 "Bad file name or number"

10. File Error 52 on NT4

11. Bad File Name or Number on XP

12. bad file name or number

 

 
Powered by phpBB® Forum Software