Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Control array | Excel Programming | |||
Control Array | Excel Programming | |||
Control array problem | Excel Programming | |||
Control Array Help... | Excel Programming | |||
Control array - does it exist in VBA as in VB? | Excel Programming |