Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force Excel to Refresh Screen
I have a macro which goes through a "for loop" for a large number of
loops and it takes several hours to finish running. I output the number the run has gone up to in the status bar to show the progress. Whenever I click away from Excel to another application or when the screensaver kicks in and I move the mouse again, I get a white screen in Excel which I can see neither the worksheet nor the status bar. I am not turning off screen updating in my code. Does anybody know whether there is a way to get Excel to refresh the screen (or at least the status bar) during an intensive calculation? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force Excel to Refresh Screen
Hi,
just a few thoughts: you should turn off screenupdating as this will speed up your code. From time to time, eg. when the statusbar changes, you can turn on screenupdating and then immediately turn it off again so that you can see what is going on. I dont know if this will also solve your problem when switching back to excel from another application. arno |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force Excel to Refresh Screen
As I understand it, it is one thing to allow Excel to update itself with
..ScreenUpdating, but another to allow processing of the message queue from Windows, as in the Paint message that will be received when Excel is reshown. Adding a DoEvents at suitable intervals will help with this. NickHK "Ming" wrote in message oups.com... I have a macro which goes through a "for loop" for a large number of loops and it takes several hours to finish running. I output the number the run has gone up to in the status bar to show the progress. Whenever I click away from Excel to another application or when the screensaver kicks in and I move the mouse again, I get a white screen in Excel which I can see neither the worksheet nor the status bar. I am not turning off screen updating in my code. Does anybody know whether there is a way to get Excel to refresh the screen (or at least the status bar) during an intensive calculation? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force Excel to Refresh Screen
Hello,
Try using DoEvents inside your code to instruct Excel to execute other tasks while running your code. I hope this helps. Regards, Karim arno wrote: Hi, just a few thoughts: you should turn off screenupdating as this will speed up your code. From time to time, eg. when the statusbar changes, you can turn on screenupdating and then immediately turn it off again so that you can see what is going on. I dont know if this will also solve your problem when switching back to excel from another application. arno |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Force charts to refresh? | Charts and Charting in Excel | |||
Excel Screen Refresh Issue in Terminal Server | Excel Discussion (Misc queries) | |||
force numbers as text as seen on screen | Excel Discussion (Misc queries) | |||
supress screen refresh when macros running in excel VB | Excel Programming | |||
Force refresh of custom functions | Excel Worksheet Functions |