Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

double

Status
Not open for further replies.

vaat

MIS
May 14, 2002
27
NL
How can I catch an overflow error when it comes and do somethinf else. So

if 5,5 * large number = overflow then
do this
else
do calculation
end if

 


On Error GoTo Defined_Label is one way or
[tt]
On Error Resume Next

Result = OverFlow_Calculation

If Err.Number <> 0 Then
'Do This
Else
'Do That
End If
[/tt]

BTW, if you are having overflow errors with a double then you could change your &quot;Result&quot; Variable to a variant and
[tt]
Result = CDec(Normally_With_A_Double_OverFlow_Calculation)
[/tt]

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top