Boa tarde!!
Quem sabe isso te ajude...
use Alt + F11para entrar no Editor VB.
Cole dentro de Estpasta_de_Trabalho
Option Explicit
Private Sub Workbook_Deactivate()
Application.CommandBars("Cell").Reset
End Sub
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Dim cBut As CommandBarControl
Dim iPostion As Integer
On Error Resume Next
Sh.Protect UserInterFaceOnly:=True
Application.CommandBars("Cell").Controls("CLEAR ALL").Delete
With Application.CommandBars("Cell")
iPostion = .Controls("Delete...").Index
Set cBut = .Controls.Add(Before:=iPostion, Temporary:=True)
.Controls("Delete...").Delete
With cBut
.Caption = "CLEAR ALL"
.OnAction = "ClearAll"
End With
End With
On Error GoTo 0
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Application.CommandBars("Cell").Reset
End Sub
Cole em um módulo
Sub ClearAll()
ActiveSheet.Protect UserInterFaceOnly:=True
Selection.Clear
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 07/03/2012 12:07 pm