Jump to content

Recommended Posts

  • 2 weeks later...
Posted

Obs.: Faça alguns testes antes de usar, pois ainda não apliquei esse código.

Se for para desabilitar Suplementos:

Em EstaPasta_de_trabalho:

Private Sub Workbook_Activate()

Application.OnKey "^b", "MENSAGEM"

With Application.CommandBars("Tools")

    .FindControl(ID:=943).Enabled = False

End With

End Sub

Private Sub Workbook_Deactivate()

With Application.CommandBars("Tools")

    .FindControl(ID:=943).Enabled = True

End With

End Sub

Em um Módulo:

Sub MENSAGEM()

Application.EnableCancelKey = xlDisabled

End Sub

Posted

Boa noite

Fiz conforme explicação mas não desabilita...

Aquilo que eu pretendo é na prática o seguinte:

Eu tenho um documento em Excel (com macros editadas). E queria que esse documento ficasse imune a Macros provindas de um ficheiro suplementos do Excel.

Obrigado

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.