Fill Label Text

  • Thread starter Thread starter Andreas Szabo
  • Start date Start date
A

Andreas Szabo

Hi

during a process in excel, a progressbar advise the status of the process.
in a label, i want to display a text, which process is now active. There are
7 processes to display. Unfortunately, just the last process will be
displayed. It's now problem with a statusbar, but i'd like to display a
label. This is the code

lblProgressBar.Visible = True
ProgressBar1.Visible = True
ProgressBar1.Min = 0
ProgressBar1.Max = 300
ProgressBar1.Value = ProgressBar1.Min

For OutputZähler = 1 To GenerateOutput

Application.ScreenUpdating = True
Application.DisplayStatusBar = True
Application.StatusBar = "Rechnet im Moment Simulation " &
OutputZähler
lblProgressBar.Caption = "Rechnet im Moment Simulation " &
OutputZähler
Application.ScreenUpdating = False

Call ExcelLesen
Call KonstantenFuellen
Call CalculateV
ROption = Log(1# + My(1))
Call HedgeCalculation
Call Cholesky
Call SimulProc

Next OutputZähler

ProgressBar1.Visible = False
lblProgressBar.Visible = False

Thanks for all your help.
 
If i understand what your asking, you want all 7 processes to show up in label but only the last one does
if so you need to use DoEvents after each change of the label text.
 
If it were me, I'd use a Label from the Forms toolbar.

I'd update it's text like this,
ActiveSheet.Shapes("Label 1").TextFrame.Characters.Text = "Processing Part 3..."

And I'd follow that line immediately with the DoEvents function.


Regards,
Vic Eldridge
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top