Results 1 to 10 of 10

Thread: Continually updating the statusbar

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,888
    Location
    I'm not a big fan of OnTime, but you can try this

    [vba]
    Option Explicit
    Public bStopUpdating As Boolean
    Public iUpdateFreq As Long
    Sub HowManyWords()
    Dim sMsg As String


    If bStopUpdating Then Exit Sub

    With ActiveDocument

    sMsg = "Paragraphs : " & Format(.ReadabilityStatistics(3).Value, "#,##0")
    sMsg = sMsg & " Words : " & Format(.ReadabilityStatistics(1).Value, "#,##0")
    sMsg = sMsg & " Characters : " & Format(.ReadabilityStatistics(2).Value, "#,##0")
    sMsg = sMsg & " Sentences : " & Format(.ReadabilityStatistics(4).Value, "#,##0")

    End With

    Application.StatusBar = sMsg

    Call Application.OnTime(Now + TimeSerial(0, 0, iUpdateFreq), "HowManyWords")
    End Sub
    [/vba]


    The attachment includes the rest of the macros, including Document events

    Paul
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •