Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to see worksheet changes while macro is running?
Usually, I disable worksheet changes while a macro is running in order to
improve the macro performance. But in this case, I want to see the worksheet changes as they occur. Oddly, that is not happening. I suspect it is because the macro is so compute-intensive that it is not giving the Excel window time to display the changes. (When I stop the macro, I do see the changes.) Is there something I should be doing in a compute-intensive macro to allow me to see worksheet changes in a timely manner? Or is this just a quirk of the Windows O/S or Office 2003 or ...? I know I can call the kernel Sleep() function to sleep for a specified number of milliseconds. But that seems excessive, both in terms of efficiency and as a programming requirement. Note: The macro writes to the Immed Window (debug.print) as well as storing into the worksheet. PS: I have seen some funny things while this macro is running. For example, when VBA is open, but not the Immed Window (as I recall), and Excel is the active window, at some point in time, the Excel window is overlayed with a partially written window -- presumably VBA, but perhaps the Immed Window. I don't know if that is intermittent or consistent behavior. (I tried it only once.) Also, sometimes when I run the macro with the VBA and Immed Window on top (VBA is the active window), the Immed Window will appear to be cleared, and I cease to see updates to it, which should occur about every second. When I stop the macro, the Immed Window updates appear. This behavior is intermittent. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to see worksheet changes while macro is running?
Well, even a call to the kernel Sleep function after each worksheet update
does not permit me to see changes consistently, even when I disable auto calc. ----- original message ----- "JoeU2004" wrote in message ... Usually, I disable worksheet changes while a macro is running in order to improve the macro performance. But in this case, I want to see the worksheet changes as they occur. Oddly, that is not happening. I suspect it is because the macro is so compute-intensive that it is not giving the Excel window time to display the changes. (When I stop the macro, I do see the changes.) Is there something I should be doing in a compute-intensive macro to allow me to see worksheet changes in a timely manner? Or is this just a quirk of the Windows O/S or Office 2003 or ...? I know I can call the kernel Sleep() function to sleep for a specified number of milliseconds. But that seems excessive, both in terms of efficiency and as a programming requirement. Note: The macro writes to the Immed Window (debug.print) as well as storing into the worksheet. PS: I have seen some funny things while this macro is running. For example, when VBA is open, but not the Immed Window (as I recall), and Excel is the active window, at some point in time, the Excel window is overlayed with a partially written window -- presumably VBA, but perhaps the Immed Window. I don't know if that is intermittent or consistent behavior. (I tried it only once.) Also, sometimes when I run the macro with the VBA and Immed Window on top (VBA is the active window), the Immed Window will appear to be cleared, and I cease to see updates to it, which should occur about every second. When I stop the macro, the Immed Window updates appear. This behavior is intermittent. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro running against hidden worksheet | Excel Discussion (Misc queries) | |||
calling/running a macro on another worksheet | Excel Programming | |||
Report with macro losing links to a particular worksheet after running macro | Excel Programming | |||
running a macro on another worksheet | Excel Programming | |||
Editing a worksheet while running a macro | Excel Programming |