View Single Post
  #9   Report Post  
the-jackal the-jackal is offline
Junior Member
 
Location: South Woodham Ferrers, Essex
Posts: 19
Default

Quote:
Originally Posted by the-jackal View Post
Ok done that but i get an error and when I debug it shoes this.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim stFile As String
If Not Intersect(Target, Me.Range("E6")) Is Nothing Then
stFile = "C:\Temp\" & Me.Range("E6") & ".JPG"
If Dir(stFile) = "" Then
MsgBox "File not found"
Else
******Me.Shapes("NewPic").Delete******
With Me.Shapes.AddPicture(stFile, True, True, Range("A16").Left, _
Range("A16").Top, Range("A16").Width, Range("A16").Width * 3 / 4)
.Name = "NewPic"
End With
End If
End If
End Sub

The text between the stars is highlighted yellow.

Carl

EDIT: Ok I deleted that line and it seems to be working fine now. Thanks again for your help.
Ok just 1 more thing. The picture is really small. Same width as A column. Can I set it to make the picture width 4 columns eg A16 to D16