excel vba - Using VBA: Assign value to label control on userform -


i working in vba code behind userform. have string variable named block corresponds name of text label on userform. after looking @ other questions seems using controls function gives ability control settings of label on userform. block variable string of labels name.i error @ attempts below

 me.controls(block).backcolor = &hffff& 

when try hard code make sure exact name of label still error

 me.controls("s111").backcolor = &hffff& 

the following line work:

 me.s111.backcolor = &hffff& 

when try similar technique error with:

me.block.backcolor = &hffff& 

what doing wrong , doing possible?

the control me.s111 object.

dim objobject object '(not type string) set objobject = me.s111 objobject.backcolor = &hffff& 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -