Solved

Visual Basic File Open Time Out Settings

Posted on 2004-09-21
2
691 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now