Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Userform - Label Caption - How to update from a variable

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.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Userform - Label Caption - How to update from a variable

"Alan" wrote in message
...

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}


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Userform - Label Caption - How to update from a variable


"Alan" wrote in message
...

{Bump}


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Userform - Label Caption - How to update from a variable

"Robin Hammond" wrote in
message ...

Not really, but you might want to save yourself some time and effort
figuring it out by using this instead:

http://www.enhanceddatasystems.com/E...rogressBar.htm


Hi Robin,

Thanks for your suggestion.

I actually already found a workaround, but I was really more
interested in understanding why my code does not work under one
circumstance where it does under another.

Do you find the same thing?

Thanks,

Alan.







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
label caption gramps Excel Discussion (Misc queries) 0 November 1st 07 03:56 PM
Defining UserForm Caption from a Variable [email protected] Excel Worksheet Functions 1 January 3rd 07 02:30 PM
changing selected label on userform w/ a variable mike k Excel Programming 1 February 19th 04 01:48 AM
Label Caption Just Wont Work on UserForm K[_3_] Excel Programming 2 September 15th 03 03:29 PM
label caption Rod Taylor Excel Programming 2 July 31st 03 03:25 AM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"