Jump to content


Rhaone's Content

There have been 2 items by Rhaone (Search limited from 29/04/2023)


Ordernar por                Order  

#1019481 Worksheet_Change

Posted by Rhaone on 24/09/2012, 15:54 in Visual Basic

por favor, alguem pode me ajudar a resolver isso?

no VBA do excel este script funciona somente quando eu altero a celula diretamente mas nao indiretamente:

as ceululas C17 e D17 contem "SE(x>0;1;0)", por exemplo, que eh como consequencia modificado pelo argumento.

grato.


Private Sub Worksheet_Change(ByVal faixa As Range)
  If Not Intersect(faixa, Range("c17:c17")) Is Nothing Then
    If faixa.Offset(0, 0).Value > 0 Then
      Application.EnableEvents = False
      MsgBox "celula C17"
      Application.EnableEvents = True
    End If
  End If
  If Not Intersect(faixa, Range("d17:d17")) Is Nothing Then
    If faixa.Offset(0, 0).Value > 0 Then
      Application.EnableEvents = False
      MsgBox "celula D17"
      Application.EnableEvents = True
    End If
  End If
End Sub


Por favor ... alguem me ajuda? ... valeu!!!



#1017734 Worksheet_Change

Posted by Rhaone on 30/03/2012, 12:41 in Visual Basic

por favor, alguem pode me ajudar a resolver isso?

no vb do excel este script funciona somente quando eu altero a celula diretamente mas nao indiretamente:

as ceululas C17 e D17 contem "SE(x>0;1;0)", por exemplo, que eh como consequencia modificado pelo argumento.

grato.


Private Sub Worksheet_Change(ByVal faixa As Range)
  If Not Intersect(faixa, Range("c17:c17")) Is Nothing Then
    If faixa.Offset(0, 0).Value > 0 Then
      Application.EnableEvents = False
      MsgBox "celula C17"
      Application.EnableEvents = True
    End If
  End If
  If Not Intersect(faixa, Range("d17:d17")) Is Nothing Then
    If faixa.Offset(0, 0).Value > 0 Then
      Application.EnableEvents = False
      MsgBox "celula D17"
      Application.EnableEvents = True
    End If
  End If
End Sub




IPB Skin By Virteq