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: 2
Default setting label properties

Good Morning,

I have a user form with 20 labels on it - named 'lstate1' through 'lstate20'.  I would like to be able to set/clear the captions property within a loop by using a variable to modify the label name.  Something like this -

Sub frmclr()
    dim i as integer
    i =1
    For i = i to 20
       frmcreated.lstate1.caption = ""
    next i
End sub

 . . .but using the variable 'i' in place of the numeric in the label name to select the proper label.  I'm using a 'For each ctrl in Controls' routine that works but I'd like to do it with the method suggested above.

thanks,
Leo

 
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
Setting worksheet properties ITQuestioner Excel Programming 3 August 24th 07 11:09 PM
Setting printing properties Carl Excel Programming 2 July 8th 06 07:01 PM
Setting Tab Properties in Excel beldarski Excel Discussion (Misc queries) 2 October 28th 05 06:10 AM
Label Scroll Bar Properties: Make Visible? Mcasteel[_44_] Excel Programming 0 November 15th 04 02:52 PM
setting properties for shapes Hawk Excel Programming 3 May 21st 04 07:31 PM


All times are GMT +1. The time now is 06:56 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"