View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sinner Sinner is offline
external usenet poster
 
Posts: 142
Default Scientific Notation problem

Below code is wht i'm using to book a serial of 19 digits.

Start: 9904785190112345080
End: 9904785190112345089


The numbers though change due to scientific notation as numbers is
very long.
----------------------------------------------------------------------------------------------------
Sub UpdateQty()
If IsNumeric(txtStart.Text) And IsNumeric(txtEnd.Text) Then
'txtQty.Text = Format((CDbl(txtStart.Text) - CDbl(txtEnd.Text) -
1), String(Len(txtStart.Text), "0"))
txtQty.Text = (CDbl(txtEnd.Text) - CDbl(txtStart.Text) + 1)
End If
End Sub
----------------------------------------------------------------------------------------------------


Would appreciate some input.