Hi,

I have the following code:

Private Sub RadBtnCI_Click()
Dim otable As Table

For Each otable In ActiveDocument.Sections(4).Range.Tables
Application.ScreenUpdating = False
Call HideTableRows_fromRadioButtons(otable)
Application.ScreenUpdating = True
Next

RadBtnCI.Select

End Sub

The "HideTableRows_fromRadioButtons" subroutine unhides plenty of rows in
many tables and calls other subroutines. It takes 15-20 seconds to complete.

During this time, despite of the Application.ScreenUpdating = False, the
left side of the screen gets filled up with black horizontal lines.

Application.ScreenUpdating = False DOES prevent the screen from showing how
each table expands and collapses gradually, but I'd like to know whether it's
possible to get rid of these annoying black lines that might confuse the user
and led him to think that the computer is going to crash.

The black lines do dissappear when the subroutine is complete, but 20
seconds of black lines filling up the screen is annoying, unprofessional and
makes you think the program is crashing.

Any help is appreciated,

Thank you

Re: Application.screenupdating = false?? What's going on? by Jonathan

Jonathan
Fri Jul 11 07:58:25 PDT 2008

Application.ScreenUpdating isn't as efficient as it ought to be at actually
freezing the screen. It has always been like that and I don't expect
Microsoft to fix it any time soon.

You could instead minimize the active window for the duration so that the
black lines don't appear.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



"JuanManuel" <JuanManuel@discussions.microsoft.com> wrote in message
news:0C38FAE9-DA38-4F9C-85B6-8ABC3FEF7A61@microsoft.com...
> Hi,
>
> I have the following code:
>
> Private Sub RadBtnCI_Click()
> Dim otable As Table
>
> For Each otable In ActiveDocument.Sections(4).Range.Tables
> Application.ScreenUpdating = False
> Call HideTableRows_fromRadioButtons(otable)
> Application.ScreenUpdating = True
> Next
>
> RadBtnCI.Select
>
> End Sub
>
> The "HideTableRows_fromRadioButtons" subroutine unhides plenty of rows in
> many tables and calls other subroutines. It takes 15-20 seconds to
> complete.
>
> During this time, despite of the Application.ScreenUpdating = False, the
> left side of the screen gets filled up with black horizontal lines.
>
> Application.ScreenUpdating = False DOES prevent the screen from showing
> how
> each table expands and collapses gradually, but I'd like to know whether
> it's
> possible to get rid of these annoying black lines that might confuse the
> user
> and led him to think that the computer is going to crash.
>
> The black lines do dissappear when the subroutine is complete, but 20
> seconds of black lines filling up the screen is annoying, unprofessional
> and
> makes you think the program is crashing.
>
> Any help is appreciated,
>
> Thank you
>
>
>



Re: Application.screenupdating = false?? What's going on? by fumei

fumei
Fri Jul 11 10:22:06 PDT 2008

It is also very possible you can perform your actions using Range, in which
case there is no on-going processing to the screen.

Jonathan West wrote:
>Application.ScreenUpdating isn't as efficient as it ought to be at actually
>freezing the screen. It has always been like that and I don't expect
>Microsoft to fix it any time soon.
>
>You could instead minimize the active window for the duration so that the
>black lines don't appear.
>
>> Hi,
>>
>[quoted text clipped - 36 lines]
>>
>> Thank you

--
Message posted via http://www.officekb.com


Re: Application.screenupdating = false?? What's going on? by macropod

macropod
Fri Jul 11 13:38:25 PDT 2008

Your code would also be more effective at freezing the screen and more effiicent if you used:

Private Sub RadBtnCI_Click()
Dim otable As Table
Application.ScreenUpdating = False
For Each otable In ActiveDocument.Sections(4).Range.Tables
Call HideTableRows_fromRadioButtons(otable)
Next
Application.ScreenUpdating = True
RadBtnCI.Select
End Sub

--
Cheers
macropod
[MVP - Microsoft Word]


"JuanManuel" <JuanManuel@discussions.microsoft.com> wrote in message news:0C38FAE9-DA38-4F9C-85B6-8ABC3FEF7A61@microsoft.com...
> Hi,
>
> I have the following code:
>
> Private Sub RadBtnCI_Click()
> Dim otable As Table
>
> For Each otable In ActiveDocument.Sections(4).Range.Tables
> Application.ScreenUpdating = False
> Call HideTableRows_fromRadioButtons(otable)
> Application.ScreenUpdating = True
> Next
>
> RadBtnCI.Select
>
> End Sub
>
> The "HideTableRows_fromRadioButtons" subroutine unhides plenty of rows in
> many tables and calls other subroutines. It takes 15-20 seconds to complete.
>
> During this time, despite of the Application.ScreenUpdating = False, the
> left side of the screen gets filled up with black horizontal lines.
>
> Application.ScreenUpdating = False DOES prevent the screen from showing how
> each table expands and collapses gradually, but I'd like to know whether it's
> possible to get rid of these annoying black lines that might confuse the user
> and led him to think that the computer is going to crash.
>
> The black lines do dissappear when the subroutine is complete, but 20
> seconds of black lines filling up the screen is annoying, unprofessional and
> makes you think the program is crashing.
>
> Any help is appreciated,
>
> Thank you
>
>
>