Solved

Excel screen not updating

Posted on 2014-11-21
5
178 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 70

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 70

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

688 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