Using MSXML2.oXTLRuntime methods in VB / JavaScript ?

P

Phil

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: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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top