Userform - Label Caption - How to update from a variable

A

Alan

Hi All,

I am using a small userform (modeless) to inform the user what is
happening during processing waits.

This is the only code in the userform, which contains just a single
label control:


Private Sub UserForm_Initialize()

lblPleaseWait.Caption = "Alan"

DoEvents

Me.Repaint

End Sub


If I run that form on it's own, it works fine - displaying the label
as "Alan".

However, if I call the userform from a sub elsewhere using this line,
the label does not display the caption, it just shows a white
background with no text:

frmPleaseWait.show (vbModeless)


I added the DoEvents and Me.Repaint after looking through this group's
archives, but they make no difference to the problem.

Any ideas why it won't show the caption when called from a sub?

Thanks,

Alan.
 
A

Alan

Alan said:
Hi All,

I am using a small userform (modeless) to inform the user what is
happening during processing waits.

This is the only code in the userform, which contains just a single
label control:


Private Sub UserForm_Initialize()

lblPleaseWait.Caption = "Alan"

DoEvents

Me.Repaint

End Sub


If I run that form on it's own, it works fine - displaying the label
as "Alan".

However, if I call the userform from a sub elsewhere using this line,
the label does not display the caption, it just shows a white
background with no text:

frmPleaseWait.show (vbModeless)


I added the DoEvents and Me.Repaint after looking through this group's
archives, but they make no difference to the problem.

Any ideas why it won't show the caption when called from a sub?

Thanks,

Alan.

{Bump}
 

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

Top