Reputation: 424
I have a macro where I need to update 20 labels using a loop to update range a1 to a20 as Label captions, but I am getting error. I am getting error because I am using Label&j. Please suggest an alternative
Sub NameListAllocate()
k = Range("Q65536").End(xlUp).Row
For j = 2 To k
UserForm1.Label&j.Caption = Range("q" & j).Value
Next
UserForm1.Show
End Sub
Upvotes: 0
Views: 777