I'm using the following code:
I need to copy the VALUE of cells G2 and G5 and paste them into another cell any time their values change. Any help would be much appreciated.
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet
If Target.Address = "$G$3" Then
Set sh = Worksheets("Sale Sheet")
On Error Resume Next
sh.Shapes("MyNewShape").Delete
With sh.Pictures.Insert(Target.Value)
.Name = "MyNewShape"
.Left = sh.Range("F5").Left
.Top = sh.Range("F5").Top
End With
ElseIf Target.Address = "$G$5" Then
Set sh = Worksheets("Sale Sheet")
On Error Resume Next
sh.Shapes("MyNewShape1").Delete
With sh.Pictures.Insert(Target.Value)
.Name = "MyNewShape1"
.Left = sh.Range("M5").Left
.Top = sh.Range("M5").Top
End With
End If
End Sub
I need to copy the VALUE of cells G2 and G5 and paste them into another cell any time their values change. Any help would be much appreciated.