DaRTH KiRo
New Member
- Joined
- Jan 24, 2018
- Messages
- 39
- Office Version
- 2016
- Platform
- Windows
I am using the VBA code below to only allow values, no formatting, to be pasted in my spreadsheet. However, once I copy data it pastes it anywhere I click and won't stop. This may cause problems for us if someone who does not know about it pastes data and clicks off into another cell. Can someone please assist me with changing the code so that it will only do it once, or always someone to ctrl+v and paste only values?
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End Sub