Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Location
    Clemmons, North Carolina, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel - Status Bar (Office 2000)

    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.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Excel - Status Bar (Office 2000)

    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
    [MS MVP - Word]

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel - Status Bar (Office 2000)

    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.
    Legare Coleman

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Brussels, Brussel, Belgium
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel - Status Bar (Office 2000)

    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,

Posting Permissions

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