Solved

VB Program will only runs correctly some of the time

Posted on 2004-09-21
1
142 Views
Last Modified: 2010-05-02
I have a vb program that reads a number of files with differnt names and processes each file to add a header.

the program works great BUT the only problem is it sometimes misses the last file unless I place a msgbox in the code to be clicked.  It like the program needs to refocus to pick up the last file.

Does anyone have any ideas.

Thanks
0
Comment
Question by:running32
1 Comment
 
LVL 10

Accepted Solution

by:
Clif earned 50 total points
ID: 12114555
Use DoEvents after processing each file.  This will allow your app to "catch it's breath".
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 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