Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
For Each ctl In ProjectenForm.Controls ctl.BackStyle = fmBackStyleOpaque Next HTH, Nikos "sjoopie" wrote in message ... Hello, Allthough I've only recently started to program vba in excel, I suspect there must be an easy way to apply vba code to multiple objects in a userform. Could anyone help me with this? I would like to 'group' the lines in the example below: ProjectenForm.EgKbA.BackStyle = fmBackStyleOpaque ProjectenForm.EgKmA.BackStyle = fmBackStyleOpaque ProjectenForm.EgKdA.BackStyle = fmBackStyleOpaque ProjectenForm.EgHbA.BackStyle = fmBackStyleOpaque ProjectenForm.EgHmA.BackStyle = fmBackStyleOpaque ProjectenForm.EgHdA.BackStyle = fmBackStyleOpaque ProjectenForm.MgKbA.BackStyle = fmBackStyleOpaque ProjectenForm.MgKmA.BackStyle = fmBackStyleOpaque ProjectenForm.MgKdA.BackStyle = fmBackStyleOpaque ProjectenForm.MgHbA.BackStyle = fmBackStyleOpaque ProjectenForm.MgHmA.BackStyle = fmBackStyleOpaque ProjectenForm.MgHdA.BackStyle = fmBackStyleOpaque Greetings, Joris -- sjoopie ------------------------------------------------------------------------ sjoopie's Profile: http://www.excelforum.com/member.php...o&userid=16110 View this thread: http://www.excelforum.com/showthread...hreadid=275576 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Make code apply to more than 1 column | Excel Discussion (Misc queries) | |||
Prompt for a range to apply code to | Excel Programming | |||
Apply more than one filter in macro/vb code | Excel Programming | |||
Would like to apply the code to protect cell | Excel Programming | |||
Can you Copy Objects from a Worksheet to a Userform | Excel Programming |