Looping through images on a userform
Dim im as MsForms.Image
for i = 1 to 10
set im = Userform1.Controls("Image" & i)
Next
--
Regards,
Tom Ogilvy
"Zarch" wrote:
How can I loop through the images on a userform? Can I add a variable counter
as the numeric part of the default image names image1, Image2 etc? Basically
I want to display multiple (dynamic) charts on a userform, so want to loop
through each image and load it's associated image file (of a chart, which is
saved when the workbook is opened). I could do it the long way by coding each
image to it's graphic file, but was looking for a more elegant solution using
a loop.
Regards and thanks,
Mark
|