Image Control - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Image Control

ISUBPISUBP Posts: 2Member
I listed the below code to show what else I've found online about my issue. This code works to pull an image from a file on my C drive according to what cell A1's contents are. This however only works on the sheet it is active on(It will only work if I manually change the value of A1). How can I populate cell A1 from a different sheet so that the picture then changes as well? Any help would be greatly appreciated!!!

Private Sub Worksheet_Change(ByVal Target As Range)

If Target <> Range("A1") Then Exit Sub
Select Case Target

Case "COM": Image1.Picture = LoadPicture("c:MMS3DTEMPCOM.bmp")
Case "COMform": Image1.Picture = LoadPicture("c:MMS3DTEMPCOMform.bmp")
Case "COMSHELL": Image1.Picture = LoadPicture("c:MMS3DTEMPCOMSHELL.bmp")

End Select
End Sub
Sign In or Register to comment.