Bom dia!!
Veja se vai dar certo, não foi testado.
Insira dentro do modulo de pasta de trabalho
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim sht As Worksheet: Set sht = Sh
If sht.Name = "Plan1" Then
SetDeleteOption (False)
End If
End Sub
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Dim sht As Worksheet: Set sht = Sh
If sht.Name = "Plan1" Then
SetDeleteOption (True)
End If
End Sub
Private Sub SetDeleteOption(ByVal AllowDelete As Boolean)
Dim CommBarTmp, Commbar As CommandBar
For Each Commbar In Application.CommandBars
Set CommBarTmp = Commbar.FindControl(ID:=847, recursive:=True)
If Not CommBarTmp Is Nothing Then CommBarTmp.Enabled = AllowDelete
Next
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 23/03/2013 5:35 am