Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
In sheet 1 I have the below code ( Private Sub Worksheet_Change(ByVal Target As Range) )
At a certain point I have this instructions: the red one doesn't work (no errors, but the value is not updated).
The strange aspect is the following: inserting a stop and going on with F8, the instruction in red works.
Any idea?
In sheet 1 I have the below code ( Private Sub Worksheet_Change(ByVal Target As Range) )
At a certain point I have this instructions: the red one doesn't work (no errors, but the value is not updated).
Code:
'......
Dim varResult As Variant
varResult = Application.WorksheetFunction.SumIf( _
Arg1:=Range(Cells(453, 2), Cells(524, 2)), _
Arg2:="H", _
Arg3:=Range(Cells(453, fc), Cells(524, fc)))
[COLOR="#FF0000"]Cells(526, fc).Value = varResult[/COLOR]
'......
The strange aspect is the following: inserting a stop and going on with F8, the instruction in red works.
Any idea?
Code:
'......
Dim varResult As Variant
varResult = Application.WorksheetFunction.SumIf( _
Arg1:=Range(Cells(453, 2), Cells(524, 2)), _
Arg2:="H", _
Arg3:=Range(Cells(453, fc), Cells(524, fc)))
[B][COLOR="#FF0000"]stop[/COLOR][/B]
[COLOR="#FF0000"]Cells(526, fc).Value = varResult[/COLOR]
'......
Last edited: