PDA

View Full Version : Right click - Paste Special Clear Formatting



projectaero
03-25-2010, 05:43 AM
Hello.
Basically we have a excel spreadsheet that is locked by the company which blocks you from ctr v from the excel document to any other document, but you can right click paste.

What i am wanting to know is there a macro you can set up that clears formatting when right clicking paste.

Thanks

SamT
03-25-2010, 07:44 AM
Right click, Paste Special.

Bob Phillips
03-25-2010, 07:51 AM
Add this to ThisWorkbook to setup the menu



Private Sub Workbook_Open()
With Application.CommandBars("cell").Controls.Add(Type:=msoControlButton, temporary:=True)

.Caption = "Clear Formatting"
.OnAction = "ClearFormatting"
End With
End Sub


And this to a standard module



Public Sub ClearFormatting()
Selection.ClearFormats
End Sub

projectaero
03-25-2010, 03:14 PM
Is there a way to bypass the:

Paste Special box:

HTML
Unicode Text
Text