• Excel – Status Bar (Office 2000)

    Author
    Topic
    #383889

    For this example:
    Application.StatusBar = “Preparing column: ” & present_col_ctr & ” out of ” & Column_ctr & ” .”

    Present_col_ctr is not being displayed on the status bar for some reason. It is > 0 because I can display it. Column_ctr displays just fine on the Status Bar. What have I left out? Both are declared as Public Integers.

    Viewing 1 reply thread
    Author
    Replies
    • #656391

      Hi Ken,

      Most likely cause would be a typo in one or more of your “Present_col_ctr” references (eg in a statement like present_col_ctr = present_col_ctr + 1). Are you using Option Explicit? That should help track the problem down. Also be wary of the capacity for “On Error Resume Next” (if you’re using it) to mask errors.

      Cheers

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    • #656484

      It is really difficult to tell without seeing the rest of the code, but my first guess would be that “present_col_ctr” as used in that statement is not the same variable name as used elsewhere in the code.

      • #656502

        hi Ken,

        for this reason, it is good practice to force explicit declaration of your variables with Option Explicit on top of each module. this will signal you of each non-existant or mispelled variable before you can run the code. I always do this myself, and i also always declare them with a capital somewhere in the name so you can see intellisense changing it after you’ve confirmed the codeline with enter. you’ll notice immediately you’ve made a type when tha capitalization doesn’t happen.

        you can also set ‘Option Explicit’ in the VBE options, so you don’t need to type it yourself. just check ‘variable declaration required’ (transl. from Dutch)

        greetings,

    Viewing 1 reply thread
    Reply To: Excel – Status Bar (Office 2000)

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

    Your information: