Solved

Excel screen not updating

Posted on 2014-11-21
5
134 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
  • 2
  • 2
5 Comments
 
LVL 18

Expert Comment

by:SimonAdept
Comment Utility
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 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
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
Comment Utility
"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
Comment Utility
Not the problem, but I did not know this could also cause the problem I was experiencing.
0
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
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.
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…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

772 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

11 Experts available now in Live!

Get 1:1 Help Now