I have this code to insert a picture from a file based on the name of the file in the A2 it puts a picture into B2. it works perfectly but I need to be able to repeat this for all rows that have a number in column A. Sometimes very long lists. Can someone please help me with a loop for all rows with a number?
Thanks
Eve
Thanks
Eve
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A2")) Is Nothing Then Exit Sub
Dim myPict As Picture
With Range("B2")
Set myPict = Range("B2").Parent.Pictures.Insert("I:\Presenter\Images\" & Target.Value & ".jpg")
myPict.Top = .Top
myPict.Width = .Width
myPict.Height = .Height
myPict.Left = .Left
myPict.Placement = xlMoveAndSize
End With
End Sub