View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
sjoopie sjoopie is offline
external usenet poster
 
Posts: 1
Default Apply vba code to multiple userform objects


Hello,

Allthough I've only recently started to program vba in excel, I suspec
there must be an easy way to apply vba code to multiple objects in
userform. Could anyone help me with this? I would like to 'group' th
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,
Jori

--
sjoopi
-----------------------------------------------------------------------
sjoopie's Profile: http://www.excelforum.com/member.php...fo&userid=1611
View this thread: http://www.excelforum.com/showthread.php?threadid=27557