LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
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



 
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
referencing forms controls AlbertYWang Excel Programming 3 February 1st 06 01:59 PM
Referencing worksheet controls Frederick Chow Excel Programming 2 December 12th 05 05:42 PM
Code to access Controls via variables? Kjell S. Johansen Excel Programming 3 August 21st 05 09:18 AM
Referencing Variables Dwinmac Excel Worksheet Functions 1 November 16th 04 06:18 PM
Referencing to controls on a worksheet John Nikolopoulos Excel Programming 3 September 10th 03 10:08 AM


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