Solved

change label caption text before each sub is ran

Posted on 2011-02-24
2
539 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 250 total points
Comment Utility
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 250 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now