excelsupernerd
New Member
- Joined
- Jul 28, 2010
- Messages
- 14
Here's how I've implemented a macro shortcut that will enable you to paste values only, even if it's from an outside application!
Enjoy! Give me feedback and let me know if it works for you too!
Code:
Sub pasteValuesOnly()
'
' Keyboard Shortcut: Ctrl+Shift+V
' This allows the macro to pass on to
' the next method if it's text from outside of Excel
On Error Resume Next
' This pastes values if from inside of Excel
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
'If there was an error, text not from inside Excel
If Error <> "" Then
ActiveSheet.PasteSpecial Format:="Text", _
Link:=False, DisplayAsIcon:=False
End If
End Sub
Enjoy! Give me feedback and let me know if it works for you too!