LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Control Array

Roger,

This works from a command button on a userform and the code loops through
all the controls and if they are labels you can format them.

Private Sub CommandButton1_Click()
Dim cCont As Control
For Each cCont In UserForm1.Controls
If TypeName(cCont) = "Label" Then
With cCont
'Your formatting code goes here
End With
End If
Next cCont
End Sub

Mike

"Roger" wrote:

I have to re format several Labels on a Userform - I only know how to format
them 1 at a time - could someone show me example code for formatting several
Labels at the same time in an array. Thankyou in anticipation

 
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
Control array Freddie Mac Excel Programming 7 April 24th 08 10:42 PM
Control Array Joe[_46_] Excel Programming 5 October 25th 07 11:54 AM
Control array problem inquirer Excel Programming 3 August 31st 05 07:10 AM
Control Array Help... excel_slave - ExcelForums.com Excel Programming 3 August 10th 05 01:19 PM
Control array - does it exist in VBA as in VB? Örjan Leringe Excel Programming 2 August 9th 04 06:30 PM


All times are GMT +1. The time now is 10:01 PM.

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"