Assuming the code runs in a userform.
To loop through the controls.![]()
Me.Controls("Ddtxt_" & j).BackColor...
Using a phone so not sure which is the problem for you, but that's how to loop through controls and 1 way to loop through an array.![]()
Dim j as Variant Dim k as Variant j = Array(27, 29, 31, 33, 35, 37, 39, 41) For each k in l 'whatever Next
Bookmarks