windows 8.0
office 2013
samsung ativ 500t
the macro (Yes_Utility_Decrement) works fine when called from any other Sub either private or not. but in that particular piece of code it does not work.
Private Sub Worksheet_Change(ByVal Target As Range)
'apply utility decrement upon changing value
If Target.Address = "$D$40" Then
If Range("D40") = Range("E39") Then
Yes_Utility_Decrement
Else: If Range("D40") = Range("E40") _
Then No_Utility_Decrement
End If
End If
'apply currency upon changing value
If Target.Address = "$D$35" Then
Call Currency_Change
End If
'apply DSA max and min upon changing value
If Target.Address = "$D$30" Or Target.Address = "$D$31" Then
Call DSAMaxMin
End If
End sub
this piece of code doesn't work although when I insert a msgbox"Hi" after then it displays the message box..
Also
'apply currency upon changing value
and 'apply DSA max and min upon changing value works fine.
this code below works
Sub test()
Dim x As Double
x = 1
If x = "1" Then
If x = "1" Then
Yes_Utility_Decrement
End If
End If
End Sub
as well as the same using
No_Utility_Decrement
I tried using
Call Yes_Utility_Decrement
Run ("Yes_Utility_Decrement")
still did not work
office 2013
samsung ativ 500t
the macro (Yes_Utility_Decrement) works fine when called from any other Sub either private or not. but in that particular piece of code it does not work.
Private Sub Worksheet_Change(ByVal Target As Range)
'apply utility decrement upon changing value
If Target.Address = "$D$40" Then
If Range("D40") = Range("E39") Then
Yes_Utility_Decrement
Else: If Range("D40") = Range("E40") _
Then No_Utility_Decrement
End If
End If
'apply currency upon changing value
If Target.Address = "$D$35" Then
Call Currency_Change
End If
'apply DSA max and min upon changing value
If Target.Address = "$D$30" Or Target.Address = "$D$31" Then
Call DSAMaxMin
End If
End sub
this piece of code doesn't work although when I insert a msgbox"Hi" after then it displays the message box..
Also
'apply currency upon changing value
and 'apply DSA max and min upon changing value works fine.
this code below works
Sub test()
Dim x As Double
x = 1
If x = "1" Then
If x = "1" Then
Yes_Utility_Decrement
End If
End If
End Sub
as well as the same using
No_Utility_Decrement
I tried using
Call Yes_Utility_Decrement
Run ("Yes_Utility_Decrement")
still did not work