![]() |
Excel (not spreadsheet) Screen refresh while VBA is running
Hello
a relatively basic question but haven't found the solution yet. While a macro is running in Excel, and when the user selects another application, the Excel screen is not updated anymore (that's not too much of an issue) but when the user gets back to Excel and the macro is still running, the screen is still not updated. That's a bit of an issue when a very slow macro is running and I want to monitor the progress, either through Application.Statusbar or through a userform- based statusbar. The value on display is basically the value as of when the user selected another application in the first place. Is there a way to do some sort of Excel Screen refresh or any way around this problem? Thanks in advance Charles |
Excel (not spreadsheet) Screen refresh while VBA is running
Did you try putting the DoEvents statement inside the innermost loop?
"Charles" wrote: Hello a relatively basic question but haven't found the solution yet. While a macro is running in Excel, and when the user selects another application, the Excel screen is not updated anymore (that's not too much of an issue) but when the user gets back to Excel and the macro is still running, the screen is still not updated. That's a bit of an issue when a very slow macro is running and I want to monitor the progress, either through Application.Statusbar or through a userform- based statusbar. The value on display is basically the value as of when the user selected another application in the first place. Is there a way to do some sort of Excel Screen refresh or any way around this problem? Thanks in advance Charles |
Excel (not spreadsheet) Screen refresh while VBA is running
Looks like it's working great. I have never used it. I understand from
Excel's help is that it gives the OS control until the backlog of events generated while the macro was running (key pressed, etc) is not cleared (and these events can themselve generate other macros). That allows the user to do virtually anything, including changing the spreadsheet while the macro is running. Is there something similar but not as strong as doevents? Charles On 9 Jul, 19:14, Charlie wrote: Did you try putting the DoEvents statement inside the innermost loop? |
All times are GMT +1. The time now is 09:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com