Consulting

Results 1 to 3 of 3

Thread: statusbar indication

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    statusbar indication

    hello
    you mark my previous question as solved,it's not.
    i am trying to get on the statusbar a progressor like a clock,as to how long it take a macro to completein this case saving a workbook.please help.
    [VBA]
    Dim Pct As Double
    For Pct = 0.1 To 1
    Application.StatusBar = "now processing " & Format(Pct, "00.00%")
    ActiveWorkbook.Save
    Next

    [/VBA]
    thanks
    moshe

  2. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Hi moshe,

    To my knowledge, you can't do this. You can start the statusbar when it starts saving, and once it's finished, but you can't show progress for the actual event itself.

    Basically, you could set it to tell you how long it took, but not how much time is left to complete it.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  3. #3
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Ken is right, this is because "ActiveWorkbook.Save" is one command. You can have a message before that and after that.

    Now if you were saving all open workbooks, you could have the status bar display a percent complete (iterative number / total number of workbooks to save).

Posting Permissions

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