View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default Declaring Decimal

DIM dSomething as DOUBLE

"Varne" wrote in message
...
Hi!

Can someone show how to declare the Decimal variable type using CDec
function?

The following codes do not work. Run time error 6 - Overflow

Sub Test()

Dim Data(300000) As Long
Dim AC As Long

For AC = 1 To 300000
Data(AC) = Data(AC - 1) + AC
Next

End Sub