View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Teodomiro[_5_] Teodomiro[_5_] is offline
external usenet poster
 
Posts: 1
Default Referencing Controls Using Variables


Chip Pearson Wrote:
Another method might be to put the controls you wish to change
inside a Frame control. Then use code like

Dim Ctrl As MSForms.Control
For Each Ctrl In Me.Frame1.Controls
If TypeOf Ctrl Is MSForms.CommandButton Then
Ctrl.BackColor = vbButtonFace
End If
Next Ctrl


Bingo! I completely forgot that frames can be useful.

Thank you, Chip

--
Teodomir

-----------------------------------------------------------------------
Teodomiro's Profile: http://www.excelforum.com/member.php...fo&userid=3314
View this thread: http://www.excelforum.com/showthread.php?threadid=53723