excel macro: decimal places

Tag: vba , macros , decimal Author: hanyuxuan81 Date: 2012-08-28

I write a vba script below to remain 7 decimal places of the value, but I don't know what's the problem.

xmlNode(1).nodeTypedValue = Worksheets("name").Cells(x + 3, y + 1).Value

xmlNode(1).nodeTypedValue.NumberFormat = "0.0000000"

The first line can run without problem (x,y is a cell position i set before). Problem exist with the 2nd sentence.

what happens? And what is your full code?
I give xmlnode(1) a number from another cell, and what i want to do is remain this number 7 decimal places.