Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel 2002 and VB declaring number as double
I have a program in VB in excel that parses a text file and loads the numbers
into the spread sheet. The problems is the numbers have gotten bigger, and are now over 2.2 billion. Dim Qty as long I had the declaration above and then changed it to Dim Qty as double but it did not change the dim it still crashes if number is 2.17 billion or higher gary |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel 2002 and VB declaring number as double
Hi,
Double will handle number far larger than 2.17 billion. When is excel crashing (what are the steps and which one brings Excel down?). Is this an Excel VBA program or are you doing this externally. If in Excel, what is your code? Are the numbers over 2.17 billion stored in the other program as number, text or what? floating-point numbers ranging in value from -1.79769313486231E308 to -4.94065645841247E-324 for negative values and from 4.94065645841247E-324 to 1.79769313486232E308 for positive values -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Gary" wrote: I have a program in VB in excel that parses a text file and loads the numbers into the spread sheet. The problems is the numbers have gotten bigger, and are now over 2.2 billion. Dim Qty as long I had the declaration above and then changed it to Dim Qty as double but it did not change the dim it still crashes if number is 2.17 billion or higher gary |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel 2002 and VB declaring number as double
RdStr = Trim(Left(RdStr, X))
X = InStr(1, RdStr, " ") Worksheets("Production").Cells(33, 5) = RdStr "used to see where crashes Qty = CLng(Left(RdStr, X - 1)) 'Crashes here TechName = Right(RdStr, (Len(RdStr) - X)) Worksheets("Data").Cells(ct2, DataC) = TechName Worksheets("Data").Cells(ct2, DataC + 1) = Qty It crashes with error code 6 overload this is what is in the string 2,780,257,000 Raw Resources "Shane Devenshire" wrote: Hi, Double will handle number far larger than 2.17 billion. When is excel crashing (what are the steps and which one brings Excel down?). Is this an Excel VBA program or are you doing this externally. If in Excel, what is your code? Are the numbers over 2.17 billion stored in the other program as number, text or what? floating-point numbers ranging in value from -1.79769313486231E308 to -4.94065645841247E-324 for negative values and from 4.94065645841247E-324 to 1.79769313486232E308 for positive values -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Gary" wrote: I have a program in VB in excel that parses a text file and loads the numbers into the spread sheet. The problems is the numbers have gotten bigger, and are now over 2.2 billion. Dim Qty as long I had the declaration above and then changed it to Dim Qty as double but it did not change the dim it still crashes if number is 2.17 billion or higher gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2002: How to find 0.00 in a column of number? | Excel Discussion (Misc queries) | |||
Excel 2002: How to convert number to text ? | Excel Discussion (Misc queries) | |||
Excel 2002 : How to deduct the first and last number ? | Excel Discussion (Misc queries) | |||
Declaring variables | Excel Discussion (Misc queries) | |||
Declaring variables | Excel Discussion (Misc queries) |