LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default changing the caption of a label

Hello all,

I created a userform with a label in Excel97 SR2. After the userform is
shown I want to change it's label through my code.
Below is the code I wrote, but the label doesn't display the string I
want it to display.

Dim MyString As String
MyString = "sample text"
UserForm1.Show
UserForm1.MyLabel.Caption = MyString

When the code that tells the form to appear is positioned at the end,
the label displays the right string. But this is not what I want, the
caption of the label must be changed multiple times.

thanks in advance,
Koos

 
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
Is it a comment ? or a label ? or a caption ?.... mars Excel Discussion (Misc queries) 2 May 24th 07 11:15 PM
Linking Cell to Label Caption papaitaliano Excel Worksheet Functions 1 March 21st 06 05:23 PM
label caption equal excel value Monique Excel Worksheet Functions 1 July 12th 05 07:33 PM
label caption Rod Taylor Excel Programming 2 July 31st 03 03:25 AM


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

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

About Us

"It's about Microsoft Excel"