Image Control - Programmers Heaven

Howdy, Stranger!

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

Categories

Image Control

ISUBPISUBP Posts: 2Member
Hello,
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.