I am trying to Copy Paste data from one cell to another.
But paste option is getting disabled after copying and selecting new cell.
I am using code for selection change as below.
I have not disabled the paste option in code.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("D12").Value <= 10 Then
Range("D12").Interior.ColorIndex = 3
Else
Range("D12").Interior.ColorIndex = 4
Application.CommandBars("Edit").Controls.Item("Paste").OnAction = ""
End If
End Sub
But paste option is getting disabled after copying and selecting new cell.
I am using code for selection change as below.
I have not disabled the paste option in code.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("D12").Value <= 10 Then
Range("D12").Interior.ColorIndex = 3
Else
Range("D12").Interior.ColorIndex = 4
Application.CommandBars("Edit").Controls.Item("Paste").OnAction = ""
End If
End Sub