home | get Sue’s code | forums | share code | registration

More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

Login

login
password
Remember me

You will need to register and log in if you want to download the source code for the Microsoft Outlook Programming book. The forums and code sharing areas are open to both registered and non-registered visitors.

share code 09-Feb-2010 02:48

Looking for help with Outlook programming projects — VSTO, add-ins, VBA, custom Outlook forms, etc.? You′ve come to the right place!

NEW! >> Subscribe to this site via RSS. For more RSS options, see the complete list of feeds on our main news page.

 

Code level: intermediate    Code area: Code Essentials Printer Friendly Version
Title: ProgressBox - VBA dialog/form showing progress
Description: Cross-application form for showing progress (with progress bar and descripptive text) from VBA. Can be used from Excel, Word, Outlook etc.
Date: 06-Oct-2005  23:30
Code level: intermediate
Code area: Code Essentials
Posted by: Steve Bateman
Body:
All 21comments
Page [ 1 2 3 Next >>  
  18-Oct-2005  17:48   
This is exactly what I need but it wont work. It won't "show" the ProgressBox.. I get a "Type mismatch". I'm new to this but can't get it to work.
  19-Oct-2005  09:00   
Can you post the code you're using to show the progress box? And maybe a little information on which of the office apps you're using, and where in the object model for the office app you've put the code that should show the progress box?

One other thought - for this to work the name "ProgressBox" needs to be unique within the app/office document - is it?
  18-Dec-2005  06:27   
Thank you. This is great. I had been looking for "Application.StatusBar" or something similar.
  27-Apr-2006  14:26   
Perfect! Nice work.
  20-Oct-2006  13:53   
This is awesome! Thank you!
  17-Dec-2007  17:33   
I am using VB6 and don't see a property for the new form titled showModal so I can set it to False. How do I set my form's property for showModal = False??
  19-Dec-2007  03:46   
It may be that this property is specific to VBA, and doesn't exist in VB6. Try it without setting the property.
  20-Dec-2007  10:20   
In VB6, a form is made modal by the calling statement, e.g.

    MyForm.Show vbModal
  19-Jan-2008  18:37   
When I attempt to start this ProgressBox from my main procedure using 'ProgressBox.Show vbModal', it displays the ProgressBox form OK, but doens't show any progress bar control in the form. Then when I click X to close the ProgressBox form, it gives me this error:

Run time error 730: Control'Progress Bar' not found.

This error in debugger points to the 'Me.Controls' statements in this sub in your ProgressBox form code. Any ideas how to fix this?

' updates the width of the progress bar to match the current percentage
Private Sub updateProgress()
  If myPercent = 0 Then
    Me.Controls("ProgressBar").Visible = False
  Else
    Me.Controls("ProgressBar").Visible = True
    Me.Controls("ProgressBar").Width = Int((Me.Controls("ProgressFrame").Width - 2) * myPercent / 100)
  End If
End Sub
 
  19-Jan-2008  18:53   
Sue, don't you mean ProgressBox.Refresh rather than ProgressBox.Repaint where used in the code? I find no method for .Repaint in VB6.
Page [ 1 2 3 Next >>  
Post your comment



name        email