Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Halray wrote:
I had the varibale declared as: Dim AreaSum as double, so I'm confused as to why one declaration works and the other doesn't. Do you think it has anything to do with re-declarating (probably not the correct wording) the variable and reassigning it the value just before writing it? TypeName function returns the type of a variable. check your variable like this: Dim AreaCounts As Double MsgBox TypeName(AreaCounts) 'your code MsgBox TypeName(AreaCounts) .Cells(RowNumber, 2) = AreaCounts I wonder if you have overlooked a typo or a mistake like "Dim AreaCounts, AreaSum As Double", and then the Variant variable has a Currency value. -- HTH, okaizawa |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to write 1234567890123456789 into a cell with number format | Excel Discussion (Misc queries) | |||
number entered in cell loses trailing zeros in formula bar | Excel Discussion (Misc queries) | |||
variable number format in cell | Excel Discussion (Misc queries) | |||
webquery loses format of leading zero and to scientific | Excel Programming | |||
Passing Number Format to a Variable | Excel Programming |