ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Screenupdating in 2003 (https://www.excelbanter.com/excel-programming/342175-screenupdating-2003-a.html)

LtLeary

Screenupdating in 2003
 
I just noticed that excel 2003 sp2 will set the screenupdating property back
to true as soon as you leave the procedure that set screenupdating= false.

Is there as switch or workaround for this ("I would really hate to have to
check for screenupdating in every proc I have!!)


For example
Sub Test()
application.screenupdating = false
'.. other code
' call another sub
ScreenTest
debug.print application.ScreenUpdating 'will return True both here
and in the called sub
application.ScreenUpdating = True
end sub

Thanks

LT




Jim Rech

Screenupdating in 2003
 
I don't think that correct. If it were this would return True:

Sub FirstSub()
SecondSub
MsgBox Application.ScreenUpdating
End Sub

Sub SecondSub()
Application.ScreenUpdating = False
End Sub


--
Jim
"LtLeary" wrote in message
m...
|I just noticed that excel 2003 sp2 will set the screenupdating property
back
| to true as soon as you leave the procedure that set screenupdating= false.
|
| Is there as switch or workaround for this ("I would really hate to have to
| check for screenupdating in every proc I have!!)
|
|
| For example
| Sub Test()
| application.screenupdating = false
| '.. other code
| ' call another sub
| ScreenTest
| debug.print application.ScreenUpdating 'will return True both here
| and in the called sub
| application.ScreenUpdating = True
| end sub
|
| Thanks
|
| LT
|
|
|



Simon Murphy

Screenupdating in 2003
 
LT
Not been able to test this myself as I am having probs downloading and
installing the patch (and I think the rest of the world is trying to
download it too)
you could try looking he
http://support.microsoft.com/kb/906600/
for a registry switch to turn off to fix this behaviour - trouble is you
have to guess which patch is causing the problem!

Thanks for the warning - I'll let you know how I get on
cheers
Simon

"LtLeary" wrote in message
m...
I just noticed that excel 2003 sp2 will set the screenupdating property
back to true as soon as you leave the procedure that set screenupdating=
false.

Is there as switch or workaround for this ("I would really hate to have to
check for screenupdating in every proc I have!!)


For example
Sub Test()
application.screenupdating = false
'.. other code
' call another sub
ScreenTest
debug.print application.ScreenUpdating 'will return True both here
and in the called sub
application.ScreenUpdating = True
end sub

Thanks

LT






Simon Murphy

Screenupdating in 2003
 
LT
It seems to work fine on my system
cheers
Simon
"LtLeary" wrote in message
m...
I just noticed that excel 2003 sp2 will set the screenupdating property
back to true as soon as you leave the procedure that set screenupdating=
false.

Is there as switch or workaround for this ("I would really hate to have to
check for screenupdating in every proc I have!!)


For example
Sub Test()
application.screenupdating = false
'.. other code
' call another sub
ScreenTest
debug.print application.ScreenUpdating 'will return True both here
and in the called sub
application.ScreenUpdating = True
end sub

Thanks

LT






LtLeary

Screenupdating in 2003
 
Thanks Jim,
You are right,
Outside of the IDE I get the expected results,
but from within the IDE is where I got the error.
Hmmmm.


"Jim Rech" wrote in message
...
I don't think that correct. If it were this would return True:

Sub FirstSub()
SecondSub
MsgBox Application.ScreenUpdating
End Sub

Sub SecondSub()
Application.ScreenUpdating = False
End Sub


--
Jim
"LtLeary" wrote in message
m...
|I just noticed that excel 2003 sp2 will set the screenupdating property
back
| to true as soon as you leave the procedure that set screenupdating=
false.
|
| Is there as switch or workaround for this ("I would really hate to have
to
| check for screenupdating in every proc I have!!)
|
|
| For example
| Sub Test()
| application.screenupdating = false
| '.. other code
| ' call another sub
| ScreenTest
| debug.print application.ScreenUpdating 'will return True both
here
| and in the called sub
| application.ScreenUpdating = True
| end sub
|
| Thanks
|
| LT
|
|
|






All times are GMT +1. The time now is 07:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com