Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
ActiveSheet.Pictures(1).Delete
If Target = "" Then Exit Sub
P = Target.Value & ".PNG"
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\图片\" & P).Select
With ActiveCell
Selection.Top = .Top + .Height
Selection.Left = .Left + .Width
End With
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
ActiveSheet.Pictures(1).Delete
If Target = "" Then Exit Sub
P = Target.Value & ".PNG"
ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\图片\" & P).Select
With ActiveCell
Selection.Top = .Top + .Height
Selection.Left = .Left + .Width
End With
End Sub