Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro running against hidden worksheet George Excel Discussion (Misc queries) 1 July 23rd 07 09:42 PM
calling/running a macro on another worksheet Sunny Excel Programming 2 April 10th 07 04:40 PM
Report with macro losing links to a particular worksheet after running macro santhu Excel Programming 0 March 1st 07 03:25 AM
running a macro on another worksheet BRC Excel Programming 2 December 27th 06 08:15 PM
Editing a worksheet while running a macro Dan Perkins Excel Programming 3 October 11th 06 04:04 AM


All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"