Does used or guests exceed figure 2,147,483,647
(i.e. two billions and something)?
If not then
can result exceed E+38 or can be less than E-45?
If not then can guests be zero (0)?
Change the code as under and try:-
Dim used, guests As Long, result As Single
If geusts = 0 Then
MsgBox "Zero guests will make it divide by zero _
and cause overflow!"
Exit Sub
End If
result = (used / guests) * 100
Sharad
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!