I have a userform in VBA that has some pictures. I need to loop through 15 pictures that have names like:
imm1, imm2, ...,imm15
And I create the paths for the pictures:
dir1 = "c:\..\pi1.jpg"
...
dir15 = "c:\..\pi15.jpg"
I'd like to create a loop like:
For i = 1 To 15
(imm & i).Visible = True
(imm & i).Picture = LoadPicture(dir & i)
Next i
What is the correct way to do it?