Workbooks.Open oddity
After I discovered that "pastespecial" and "replace" method are not
able to make Excel recognize the numbers as numbers I've implemented
now a work around by converting each single cell separately with a
typeconversion. Not very fast but at least it works.
Sub myOpenXML()
Dim n As Range
Dim c As Range
Workbooks.Open Filename:="PAGE1.xml"
Set n = Range("A3:F" & LastCell(ActiveSheet).Row)
For Each c In n ' type conversion of every single cell : at
least this one works!
If TypeName(c.Value) = "String" Then
If InStr(1, c.Value, ",") Then
c.Value = CDbl(c.Value)
Else
c.Value = CInt(c.Value)
End If
End If
Next c
End Sub
|