Consulting

Results 1 to 3 of 3

Thread: Problem in displaying a progress bar

  1. #1

    Problem in displaying a progress bar

    Hi all,

    Here I am dealing with heavy calculations with VBA, so wanted to put a Userform saying that "calculation is going on". Here my goal is, just when calculations start that userform will pop-up and when it complete that will automatically hides. So I wrote following codes :

    [VBA]sub calculation()
    userform1.show
    .................................
    calculations
    .................................
    userform1.hide
    end sub[/VBA]

    However this strategy seems not working. calculation() is not doing anything as long as userform1 is open. Once I close it manually then I get the results from calculation(), otherwise it doesn't.

    What is the correct way to do that? Am I missing anything ? Your help will be highly appreciated.

    Thanks
    Last edited by Aussiebear; 02-21-2010 at 02:55 PM. Reason: Added vba tags to code

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    What is the calculation code doing?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    Try

    [vba]
    userform1.show vbModeless
    [/vba]

    and see if that does what you'd like

    It's not really a prgress bar, but you can write text to the User form

    There are plenty of real Progress Bar modules around that will start with an empty gauge and fill it in with a color are calculations progress

    Paul

Posting Permissions

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