arnelgp
..forever waiting... waiting for jellybean!
- Local time
- Today, 16:33
- Joined
- May 7, 2009
- Messages
- 19,927
can you show the error?
you can prevent the error if you calculate first the "complicated formula"
you can prevent the error if you calculate first the "complicated formula"
Code:
With .Range("N" & i)
Dim dblResult As Variant
On Error Resume Next
dblResult = Null
If rsBS!CURRE & "" = "S" Then
dblResult = [complicated formula]/1.0443
ElseIf rsBS!CURRE & "" = "E" Then
dblResult = [complicated formula]
End If
If (Err = 0) Then
.Value = dblResult
End If
Err.Clear
On Error Goto 0
End With