Private Sub Worksheet_Change(ByVal T As Range)
Dim p, f, x
If T.Row Mod 11 <> 1 Or T.Column <> 6 Or T.Count <> 1 Or T.Value = "" Then Exit Sub
p = ThisWorkbook.Path
f = "Picture " & T.Row
Set x = Cells(T.Row, 1).MergeArea
Me.Unprotect
'1)删除
On Error Resume Next
Me.Shapes(f).Delete
On Error GoTo 0
'2)添加
With Me.Pictures.Insert(p & "\图片\" & T.Value & ".jpg")
.Name = f
.ShapeRange.LockAspectRatio = msoFalse
.Left = x.Left
.Top = x.Top
.Height = x.Height
.Width = x.Width
End With
Private Sub Worksheet_Change(ByVal T As Range)
Dim p As String
Dim f As String
Dim Rng As Range
If T.Row Mod 11 <> 1 Or T.Column <> 6 Or T.Count <> 1 Or T.Value = "" Then Exit Sub
p = ThisWorkbook.Path & "\图片\"
f = "Picture " & T.Row
Set Rng = Cells(T.Row, 1).MergeArea
Me.Unprotect
On Error Resume Next
Me.Shapes(f).Delete
On Error GoTo 0
With Me.Pictures.Insert(p & T.Value & ".jpg")
.Name = f
.ShapeRange.LockAspectRatio = msoTrue
.Left = Rng.Left
.Top = Rng.Top