Solved

Visual Basic File Open Time Out Settings

Posted on 2004-09-21
2
693 Views
Last Modified: 2013-11-25
Good morning all
Is there a setting I can increase to see how long VB ( and .NET ) wait before they fail when trying to create a file. It seems to be about 5 seconds at the present.

Open "\\NEWTON\C$\TESTFILE" For Output As #1

If the server is very busy eg many reports running, the above line fails ( VB and .NET)

Thanks in advance
0
Comment
Question by:parkerig
2 Comments
 
LVL 5

Accepted Solution

by:
brianb99999 earned 50 total points
ID: 12118843
Try putting a doevents in before you perform the open?
0
 
LVL 19

Assisted Solution

by:BrianGEFF719
BrianGEFF719 earned 50 total points
ID: 12119686
i think you might want to try using CreateFileEx() API instead of using VB's native OPEN function. The reason for this is, i belive that you can adjust the time out and have a little more control over the file open command.

-Brian
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SAPE.heur.AE935 Visual Studio 3 46
What are the big features of MVC5? 4 85
Set email body to html using vbscript 6 41
Export Data to Different .csv Files 26 104
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question