Picture Form Help

L

Looping through

Does anyone know how to change a picture within a form based on a cell
reference in number?

IE if cell a3=4, image1 will have a different image activated than if cell
a3 returms a 7.

Any Help is appreciated.
Thanks
Pete
 
P

Peter T

Me.Image1.picture = img.Picture

where img refers to some other image control containing your picture
associated with the index in a3

This of course assumes you have already assigned pictures to a number of
image controls. these could be on a sheet or hidden in the userform (or even
a different userform).

Alternatively of course you could load from file
Me.Image1.Picture = LoadPicture(sFile)

where sFile refers to the path and name of the image file associated with
the index in a3

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top