Consulting

Results 1 to 7 of 7

Thread: Modeless progress bar

  1. #1

    Modeless progress bar

    Good Afternoon,

    Im looking for a code that works (unfortuantely mine doesnt )

    I have a dashboard which opens a raw data files and updates the main dashboard but has calculation time. I need a progress bar that basically says "updating data..." with a progress bar that closes once with the calculation is complete or after a set period of time.

    I have a progress bar that works and I can get the files to open.

    however I cant get a progress bar to work and the files open behind it and the progress bar updates.

  2. #2
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    There is an article here with sample code and workbook.
    Be as you wish to seem

  3. #3
    ah nice.. I like the look of this.. its good.

    I'm not at work to test if the other items load behind but looks better than I had.


    Only problem I do have is that I dont want a macro button. I'd want it to activate on workbook open.
    Except, when using the code in the example above it doesnt seem to work. It only shows "label" like the VBA design rather than actually working.

    Any ideas?

  4. #4
    shameless bump..

    I do have another idea if this wont work by onload

  5. #5
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    What code did you actually use? I can't see any reason why it wouldn't work either way, but I suggest you don't call it directly in Workbook_Open. Create another routine in a normal module that does the real work, then in the open event just use:
    [vba]Private Sub Workbook_Open
    Application.Ontime Now, "your_routine_name"
    End Sub[/vba]
    Be as you wish to seem

  6. #6
    the procedure in the module is:

    Sub performActions()    Dim i As Long
        Dim diag As New ProgressDialogue
        diag.Configure "Finding data", "Please wait...", 1, 2468
        diag.Show
        For i = 1 To 2468
            diag.SetValue i
            diag.SetStatus "Processing Data... " & i
            If diag.cancelIsPressed Then Exit For
        Next i
        diag.Hide
    End Sub
    in THISWorkbook i had

    Private Sub workbook_open()
    ProgressDialogue.Show
    End Sub

    progressdialogue being the name of the UF

  7. #7
    ahh in suggesting what you did ive managed to fix it!! excellent..

    Thanks a bunch

Posting Permissions

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