+ Reply to Thread
Results 1 to 1 of 1

VBA : Simple use of the Status Bar, and a Progress Bar solution

  1. #1
    Valued Forum Contributor
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    2016
    Posts
    371

    VBA : Simple use of the Status Bar, and a Progress Bar solution

    Hi all,

    A few months ago I created a pair of public functions to easily update the Status Bar and Progress Bar in MS Access which displays simple information when running code. You can see these over on the Access-Programmers forum: https://www.access-programmers.co.uk...d.php?t=293562

    Today I needed them in Excel and have converted them to Excel's VBA environment, so I thought I would share.

    The Status Bar is the grey bar at the bottom of the application window. In Excel it is only in the left hand side of this bar. It can easily be missed so this is not intended as an ideal solution for end-users. Instead it is more of a "if you know it's there, it's useful" for attentive users and those using/developing their own VBA code.

    Feel free to remove the author info at the beginning, but the notes are useful to keep in.

    Status Bar
    Straightforward conversion.
    Please Login or Register  to view this content.
    To update the Status Bar with your chosen text you simply use:
    Please Login or Register  to view this content.
    Passing no argument (or an empty string) resets the status bar and gives control back to Excel.
    Name:  SBar.PNG
Views: 325
Size:  1.2 KB


    Progress Bar
    Now, this one is a bit trickier. In Access, there is a native progress bar that you can use. In Excel, there is none... but I still wanted to be able to display progress in a bar. One solution is to use the status bar to mimic a progress bar. I used those weird block ASCII characters I know you've seen but never really had a use for.
    Please Login or Register  to view this content.
    To use this function you either pass a number or a string, and it will update the progress bar or progress title accordingly.

    For a working example you can use the code I used to test the functionality:
    Please Login or Register  to view this content.
    Examples
    Test1: Name:  PBar_Excel_1.PNG
Views: 321
Size:  1.4 KB
    Test2: Name:  PBar_Excel_2.PNG
Views: 342
Size:  1.2 KB
    Test3: Name:  PBar_Excel_3.PNG
Views: 322
Size:  935 Bytes



    Enjoy
    Last edited by Stormin'; 07-18-2017 at 08:04 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Progress or status bar without making a userform
    By Cyclops in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2016, 02:12 AM
  2. Fun Status Bar Progress Codes
    By vamosj in forum Tips and Tutorials
    Replies: 2
    Last Post: 07-29-2015, 05:09 PM
  3. Status/Progress Bar while running macro
    By tnuis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2013, 10:58 AM
  4. Status Bar as progress bar
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-30-2009, 11:50 AM
  5. Control a progress bar (by VBA) under XL build-in status bar
    By leecs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2009, 11:59 PM
  6. Opening form to show the progress status
    By akabraha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2007, 07:58 PM
  7. need a progress bar for status bar
    By funkymonkUK in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-22-2006, 09:25 AM

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