View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default Why do windows go blank?

I am using WinXP SP3 and Excel 2003 SP3 with VBA 6.5.


I have a long-running macro that is CPU-intensive. However, about every 1
sec, I log some information and sleep for 20 msec.

After "a while" (it varies), one or more open windows go blank. That is,
there is nothing but white inside the window frame. Moreover, my VBA window
is no longer the active window -- none is.

When I log to the Immediate Window, that window goes blank very soon, often
as soon as one page is filled (i.e. the window scrolls).

But this also happens when I log to a file -- and this time, it happened to
all windows, foreground and background. (I had walked away from the
computer for about 45 min.)

The system is still responsive. When I "break" and end the macro,
everything is usually restored to normal. But it is still disconcerting.

Any idea why that happens? Any idea how I can avoid it?

I suspect this is really a WinXP issue. Any idea what NG would be monitored
by responsive people who are knowledgable in this area (the O/S)?

I've tried posting such technical questions to m.p.windowsxp.general in the
past. The response are usually not impressive.

I have extensive O/S background, albeit not with MS Windows. 20 msec is
usually at least two "ticks" (about 33 msec on WinXP). That is usually
plenty of time to run other non-CPU-intensive processes, e.g. for window
updates and timer-based bookkeeping.

Nonetheless, in other circumstances, I have extended the sleep to as much as
1 sec, to no avail.