Solved

Excel screen not updating

Posted on 2014-11-21
5
157 Views
Last Modified: 2014-11-22
I have an Excel VBA application that process SKU numbers.  During the process, a form I have to show the user which item is being processed.  Suddenly, it has stopped updating after just the first 3 items.  Each item takes about a second or two.  Also, Excel and the caption on the form starts displaying "not responding".  I tried writing to the status bar, but it stops after the 3rd item also.  Another user has been complaining that his stops after 33 items.

What is going, and how do I fix it?
0
Comment
Question by:rrhandle8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40459371
It could be a number of things. Can you post a sample of the workbook with any sensitive data removed?

If that's not possible, check the code for the form and any variables you have instantiated.
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 40459380
This often is the result of On Error Resume Next set and an error occuring somewhere in the processing, rendering following actions to do either nothing or to trigger more errors (which are again ignored). First action to take is to comment that statement out, and then test again.
0
 

Author Comment

by:rrhandle8
ID: 40459856
"On Error Resume Next"? I'll keep my eye on that.
In this particular case, I forgot to add "DoEvents" inside the loop. Duh!
0
 

Author Closing Comment

by:rrhandle8
ID: 40459857
Not the problem, but I did not know this could also cause the problem I was experiencing.
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 40459932
DoEvents only allows processing of Winfows and application messages while still running VBA code. As soon as the code ends, everything left will be processed. I don't why this should cause issues, unless it is a very long running procedure.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 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