Boa tarde.
Tenho duas planilhas "A" e "B"
Como defino Range das duas no código Abaixo?
ex:
na planilha "A" vou usar L19, L22, L25, L28
na planilha "b" vou usar BA19, BA22, BA25, BA28
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("L19,L22,L25,L28")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
OCULTAR_REEXIBIR_LINHA02_B
' Display a message when one of the designated cells has been
' changed.
' Place your code here.
' MsgBox "Cell " & Target.Address & " has changed."
End If
End Sub
Postado : 13/04/2016 2:04 pm