Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

change label caption text before each sub is ran

Posted on 2011-02-24
2
Medium Priority
?
552 Views
Last Modified: 2012-05-11
I have an excel sheet with a button.
When the button is pressed a form (frmProgress) with a blank label (lblProgress) and 4 sub's are called.
Before each sub is ran I'd like the label caption on the form to display some text...

Why is this not working?

frmProgress.Show vbModeless
            DoEvents
            frmProgress.lblProgress.Caption = "Downloading exchange rates..."
            Call GetExchangeRate
            frmProgress.lblProgress.Caption = "Setting definitions..."
            Call Definitions
            frmProgress.lblProgress.Caption = "Downloading activity..."
            Call GetAccessQueries
            frmProgress.lblProgress.Caption = "Creating report..."
            Call CreateReport
            frmProgress.lblProgress.Caption = "Done"
            Unload frmProgress

Open in new window

0
Comment
Question by:cbsbutler
2 Comments
 
LVL 28

Assisted Solution

by:omgang
omgang earned 1000 total points
ID: 34970669
Perhaps you need to refresh the label and/or form after each update to the label caption
OM Gang
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 1000 total points
ID: 34971031
To elaborate on that:
With frmProgress
   .Show vbModeless
            DoEvents
            .lblProgress.Caption = "Downloading exchange rates..."
            .Repaint
            Call GetExchangeRate
            .lblProgress.Caption = "Setting definitions..."
            .Repaint
            Call Definitions
            .lblProgress.Caption = "Downloading activity..."
            .Repaint
            Call GetAccessQueries
            .lblProgress.Caption = "Creating report..."
            .Repaint
            Call CreateReport
            .lblProgress.Caption = "Done"
            .Repaint
End With
            Unload frmProgress

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question