Notifications
Clear all

Target.Address

3 Posts
1 Usuários
0 Reactions
1,164 Visualizações
(@vonzuben)
Posts: 549
Prominent Member
Topic starter
 

Como usar esse código em outro aba ativa ?

If Target.Address(False, False) = "D12" Then
Application.EnableEvents = False
Target.Value = StrConv(Target.Value, vbUpperCase)
Application.EnableEvents = True
End If

OBS: já estou usando esse código em outra aba na G12

Obrigado desde já !

 
Postado : 09/07/2016 2:10 pm
(@vonzuben)
Posts: 549
Prominent Member
Topic starter
 

Não seria isso ?

If Target.Address(False, False) = "G12" Then
    Application.EnableEvents = False
    Sheets("Plan1").Target.Value = StrConv(Sheets("Plan1").Target.Value, vbUpperCase)
    Application.EnableEvents = True
End If


If Target.Address(False, False) = "D12" Then
    Application.EnableEvents = False
    Sheets("Plan2").Target.Value = StrConv(Sheets("Plan2").Target.Value, vbUpperCase)
    Application.EnableEvents = True
End If
 
Postado : 10/07/2016 10:42 am
(@vonzuben)
Posts: 549
Prominent Member
Topic starter
 

Segue em anexo

 
Postado : 10/07/2016 1:14 pm