Private Sub Worksheet_selectionChange(ByVal Target As Range)
Dim pic As Shape
For Each pic In ActiveSheet.Shapes
If Not Application.Intersect(Range(pic.TopLeftCell.Address, pic.BottomRightCell.Address), Target) Is Nothing Then
With pic
.LockAspectRatio = 0
.Left = Target.Left + 2.5
.Top = Target.Top + 2.5
.Height = Target.Height - 5
.Width = Target.Width - 5
End With
End If
Next pic
End Sub
(, 下载次数: 32)