Just to add:
If you put this in the userform's codemodule you can use:
it's the shorthand forCode:sub snb() For j = 1 To 2 Me("CommandButton" &j).backcolor = 12648447 Next end sub
orCode:sub snb_longer() For j = 1 To 2 controls("CommandButton" &j).backcolor = 12648447 Next end sub
Code:sub snb_still_longer() For j = 1 To 2 Me.controls("CommandButton" &j).backcolor = 12648447 Next end sub




Reply With Quote

Bookmarks