Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable overflow
Is there a way for a large number to be assigned to a variable? For example: Dim maxlen as Currency Sub maxlen = application.worksheetfunction.combin(60,20) End sub maxlen produces an overflow error. Is there a way around this? Regards Dk *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable overflow
Dim maxlen as Double
-- Cheers Nigel "Derick Hughes" wrote in message ... Is there a way for a large number to be assigned to a variable? For example: Dim maxlen as Currency Sub maxlen = application.worksheetfunction.combin(60,20) End sub maxlen produces an overflow error. Is there a way around this? Regards Dk *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable overflow
use a double. Numbers in the Excel sheet are doubles
from the immediate window: a = application.combin(60,20) ? a 4.1918445058055E+15 -- Regards, Tom Ogilvy "Derick Hughes" wrote: Is there a way for a large number to be assigned to a variable? For example: Dim maxlen as Currency Sub maxlen = application.worksheetfunction.combin(60,20) End sub maxlen produces an overflow error. Is there a way around this? Regards Dk *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable overflow
Thanks, Using double still poses a problem. I would using maxlen in a
loop and reducing it by 1 after each iteration. Regards Dk *** Sent via Developersdex http://www.developersdex.com *** |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable overflow
why would you even think about looping over a number like that. The value
returned by combin only has 15 significant digits, so you are not getting the exact number any how Anyway, even if it took 1 millionth of a second to do each loop, it would take around 132 years to complete the loop. I could be off by a couple of years. -- Regards, Tom Ogilvy "Daniel" wrote: Thanks, Using double still poses a problem. I would using maxlen in a loop and reducing it by 1 after each iteration. Regards Dk *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Overflow | Excel Programming | |||
Overflow Error | Excel Programming | |||
buffer overflow | Excel Programming | |||
VBA overflow | Excel Programming | |||
VBA overflow | Excel Programming |