
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ele As Range
Set ele = Range("A1:A50")
If Not Intersect(Target, ele) Is Nothing Then
If Target.Value = "" Then GoTo 1
If Target.Value = 0 Then
Pictures(3).Select: Selection.Copy
ElseIf Target.Value = 1 Then
Pictures(2).Select: Selection.Copy
ElseIf Target.Value = 2 Then
Pictures(1).Select: Selection.Copy
End If
Cells(Target.Row, Target.Column + 1).Select
ActiveSheet.Paste: Cells(1, 3).Select
End If
1 Set ele = Nothing
End Sub
|
