Notifications
Clear all

ATIVAR MACRO AUTOMATICAMENTE

3 Posts
2 Usuários
0 Reactions
1,032 Visualizações
(@wellington_parreiras)
Posts: 33
Trusted Member
Topic starter
 

Pessoal, boa tarde.
Gostaria de saber se é possível executar um macro quando uma determinada célula for selecionada.
Por exemplo:
Estou fazendo o preenchimento de uma determinada planilha, inserindo os dados manualmente porem quando eu selecionar a celula “B5”, o excel executará a macro "X".

Atenciosamente

Wellington

 
Postado : 17/10/2012 1:33 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Segue o exemplo...

 
Postado : 17/10/2012 2:26 pm
(@fernandofernandes)
Posts: 43750
Illustrious Member
 

Boa noite!!
Tente..

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    If Target.Address = "$B$5" Then
        Call MinhaMacro
    End If
End Sub
 
Postado : 17/10/2012 5:49 pm