You are on page 1of 1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'UpdatebyEntendoffice20161111
Application.ScreenUpdating = False
Dim xRg As Range, sPic As Shape
For Each sPic In ActiveSheet.Shapes
If Target.Column > 1 Then
Set xRg = Target.Offset(, -1)
With sPic
If TypeName(.OLEFormat.Object) = "Picture" Then
If .TopLeftCell.Address = xRg.Address Then
.Height = 350
.Width = 250
.ZOrder msoBringToFront
End If
End If
End With
ElseIf Target.Column = 1 Then
With sPic
If TypeName(.OLEFormat.Object) = "Picture" Then
.Height = 60
.Width = 60
End If
End With
End If
Next sPic
Application.ScreenUpdating = True
End Sub

You might also like