• VBA – Scrrenupdating….does .View take precedence (Env: O2000 sr-1 on eit

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » VBA – Scrrenupdating….does .View take precedence (Env: O2000 sr-1 on eit

    Author
    Topic
    #382815

    Hi,

    Would anyone know if it is so, that if I change the .View setting in word this overrules any
    application.screenupdating=false that may precede it ??

    (it definitely looks so, eg. I swap from “PageView” to “HeaderFooterView” and back, my screen is constantly
    updated with a lot of flickering, though Application.Screenupdating=False)

    Any ideas – thanks,
    ;o)) henrik

    Viewing 1 reply thread
    Author
    Replies
    • #650271

      In general, setting ScreenUpdating = False in Word and Excel, or Echo = False in Access, works only partly; it doesn’t seem to prevent flickering. I have noticed this in many situations.

      • #650283

        Screenupdating = False gets overridden by Word in lots of circumstances.
        Short of using the Windows API to lock the window, there’s no geberal solution.

        Often one can re-organize/re-code the code to reduce screen flicker.
        In Word, the best way is to use the Range object instead of the Selection object.
        Once the Range object is used, one needs to re-organize the code to reduce flicker.

        If the code was originally written for (or designed AS IF), say, Word 97, screen flicker will be exacerbared in Word 2000 and Word 2002, unless the code is redesigned to take into account the difference between MDI on Word 97 and SDI in Word 2000/2002.

        • #650725

          Howard, appreciate your comment, thanks.

          What API would you use ?
          – wouldn’t it block for other dialogs from the same application, or would they run in separate threads ?

          ;o) Henrik

          • #650871

            I would not use the API.
            Best to convert from Selection to Range object, etc.

            You’ll end up with much faster and easier to maintain code.

    • #650479

      Is it possible to minimize the flickering window(s) while the process runs?

      • #650703

        To some extend – if I following a view change add a .screenupdating=false, then it works (most the time) until the next change in the “View” setting.

    Viewing 1 reply thread
    Reply To: VBA – Scrrenupdating….does .View take precedence (Env: O2000 sr-1 on eit

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: