Hi I am a novice on VBA.
But I wish to modify this formula below so that it can size the pics displayed proportionally.
The macro currently only show a pic based on cell value.
Pls help.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myPict As Picture
Dim PictureLoc As String
If Target.Address = Range("P3").Address Then
ActiveSheet.Pictures.Delete
PictureLoc = "C:\Users\TECHINICIAN\Desktop\LABELS" & Range("P3").Value & ".png"
With Range("U2")
Set myPict = ActiveSheet.Pictures.Insert(PictureLoc)
End With
End If
End Sub
Regards
Solomon
But I wish to modify this formula below so that it can size the pics displayed proportionally.
The macro currently only show a pic based on cell value.
Pls help.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myPict As Picture
Dim PictureLoc As String
If Target.Address = Range("P3").Address Then
ActiveSheet.Pictures.Delete
PictureLoc = "C:\Users\TECHINICIAN\Desktop\LABELS" & Range("P3").Value & ".png"
With Range("U2")
Set myPict = ActiveSheet.Pictures.Insert(PictureLoc)
End With
End If
End Sub
Regards
Solomon