View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Atreides Atreides is offline
external usenet poster
 
Posts: 41
Default Screen Updating problem with nested subroutines

Thanks Tom, that works!

"Tom Ogilvy" wrote:

Sub main()

Application.ScreenUpdating = False
nestedSub
Application.ScreenUpdating = True

End Sub

Sub nestedSub()
Dim bState as Boolean
bState = Application.ScreenUpdating
If bState then _
Application.ScreenUpdating = False
Code here...
if bState then _
Application.ScreenUpdating = True
End Sub

--
Regards,
Tom Ogilvy


"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
"Jim Cone" wrote:
Remove the screenupdating code from "nestedSub"


I should have stated that I want to also run nestedSub on it's own (i.e.
without calling main) and not have screen flicker. Currently, nestedSub
without that code creates screen flicker as it runs. That's why the
screenupdating code is in nestedSub.

(Sorry if my generic names are misleading)

Atreides