View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Number variable loses format on write

Hmmm. What are the two numbers?

Then we can try some simple tests.

Halray wrote:

Two decimal places are displayed in the formula bar. In the debugger the
varibale has four decimal places.

--
Ray

"Dave Peterson" wrote:

If you look in the formulabar, do you see all 4 decimals?

If yes, try widening the column.

If no, what value do you see in the debugger and what value do you see in the
formulabar?

Halray wrote:

Have have a varibale declared as a double, read a number into it from a file.
THe variable is indicated with four decimal places when viewed in the
debugger. When I write the variable out to Excel using the following the
number gets truncated to two decimal places:

With ActiveWorkbook.Worksheets("Dump Area")
.Cells(RowNumber, 2) = AreaCounts

Anyone have any suggestions to fix this problem?

Thanks !

--
Ray


--

Dave Peterson


--

Dave Peterson