Picture Form Help

  • Thread starter Thread starter Looping through
  • Start date Start date
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
 
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
 
Back
Top