sspatriots
Well-known Member
- Joined
- Nov 22, 2011
- Messages
- 585
- Office Version
- 365
- Platform
- Windows
Hi,
The CommandButton code below will copy a cell value and paste it into any cell that I select. However, I need it to only paste the copied value and not the cell color format in the destination cell. Hoping there is a simple way of doing this that I'm just not seeing.
Thanks, SS
The CommandButton code below will copy a cell value and paste it into any cell that I select. However, I need it to only paste the copied value and not the cell color format in the destination cell. Hoping there is a simple way of doing this that I'm just not seeing.
Thanks, SS
VBA Code:
Private Sub CommandButton4_Click()
Dim myRange As Range
Dim CopyRange As Range
Set CopyRange = Range("C4")
On Error Resume Next
Set myRange = Application.InputBox(Prompt:="Select Cell to Paste Clipboard Contents", Title:="Format Titles", Type:=8)
If myRange Is Nothing Then
MsgBox "No selection made", vbCritical, "Input required"
Exit Sub
End If
CopyRange.Copy Destination:=myRange
End Sub