deadstone
10-16-2003, 11:15 AM
Hi all,
In JavaScript or VB I want to use the XML - IXTLRuntime method FormatNumber. Trouble is that the class is Not Creatable, though it is Public (in VB Object Browser!).
In the documentation (XML 3) it even states there is a Visual Basic syntax like this:
strValue = oXTLRuntime.formatNumber(dblNumber, bstrFormat)
so I tried this code:
>>>> CODE SNIPPET >>>>
Dim xmlFunc As MSXML2.IXTLRuntime
Dim xyz As Double
Dim abc As String
xyz = 1234567.89
set xmlfunc=new msxml.ixtlruntime ' DOES NOT WORK !!!
abc = xmlFunc.FormatNumber(xyz, ",")
<<<< END CODE <<<<
and it does not work. This, of course is because the class is not createable.
So what interface can I use to access this function in VB or JavaScript without using an XSL STylesheet!
The reason is not to use it in VB of course, but in fact to use it in JavaScript on a client using the New ActiveX Object syntax. Then I can format a number to currency in 1 line of code!
thanks for any help
Philip
In JavaScript or VB I want to use the XML - IXTLRuntime method FormatNumber. Trouble is that the class is Not Creatable, though it is Public (in VB Object Browser!).
In the documentation (XML 3) it even states there is a Visual Basic syntax like this:
strValue = oXTLRuntime.formatNumber(dblNumber, bstrFormat)
so I tried this code:
>>>> CODE SNIPPET >>>>
Dim xmlFunc As MSXML2.IXTLRuntime
Dim xyz As Double
Dim abc As String
xyz = 1234567.89
set xmlfunc=new msxml.ixtlruntime ' DOES NOT WORK !!!
abc = xmlFunc.FormatNumber(xyz, ",")
<<<< END CODE <<<<
and it does not work. This, of course is because the class is not createable.
So what interface can I use to access this function in VB or JavaScript without using an XSL STylesheet!
The reason is not to use it in VB of course, but in fact to use it in JavaScript on a client using the New ActiveX Object syntax. Then I can format a number to currency in 1 line of code!
thanks for any help
Philip