+ Reply to Thread
Results 1 to 3 of 3

Progress Bar

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Posts
    164

    Progress Bar

    Hi there,

    i would very much like to include a progress bar, or use the command bar status section to display how my macro is doing (so users do not think the process has crashed)

    I have several modules that are run, starting with Module1.

    Does anyone have some plug and play code that I can simply copy and paste, and just insert "Call openfobs()" into?

    thanks in advance,
    Matt

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon Matpj

    There are quite a few examples available, which provide "slot in" code to add to your project. Try these out :

    http://www.cpearson.com/excel/Progress.htm
    http://www.andypope.info/vba/pmeter.htm

    HTH

    DominicB

  3. #3
    K Dales
    Guest

    RE: Progress Bar

    The status bar can be written to as follows:

    Application.StatusBar = "Please wait..."
    When done set Application.Statusbar = False to give control back to Excel.

    But there is no "plug and play" way to show how much progress you have made
    since the status bar text has no way of knowing what your code is doing, or
    how close to done it is, without being in some way linked to your code.
    Normally, what takes code a long time to run is a loop; so you could update
    the bar in your loop to show progress:

    For i = 1 to 1000
    ' Your loop code
    Application.StatusBar = "Please wait: " & Format(i/1000,"%##0") & "
    complete"
    Next i

    But how to do this depends on what kind of loops you have in your code and
    how you would "measure" progress.

    There is also an ActiveX ProgressBar available in the "Other Controls" of
    the control toolbox that can be used, but likewise needs to be linked to your
    code.
    --
    - K Dales


    "matpj" wrote:

    >
    > Hi there,
    >
    > i would very much like to include a progress bar, or use the command
    > bar status section to display how my macro is doing (so users do not
    > think the process has crashed)
    >
    > I have several modules that are run, starting with Module1.
    >
    > Does anyone have some plug and play code that I can simply copy and
    > paste, and just insert "Call openfobs()" into?
    >
    > thanks in advance,
    > Matt
    >
    >
    > --
    > matpj
    > ------------------------------------------------------------------------
    > matpj's Profile: http://www.excelforum.com/member.php...o&userid=21076
    > View this thread: http://www.excelforum.com/showthread...hreadid=483556
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1