VBA to FWH

VBA to FWH

Postby driessen » Sat Jun 12, 2010 11:30 am

Hello,

Here is VBA-code to convert a traditional banking account number to IBAN :
Code: Select all  Expand view
Public Function BBANtoIBAN(ByVal BBAN As String) As String
Dim xd As Object
Set xd = CreateObject("msxml2.domdocument.4.0")
xd.Load "http://www.ibanbic.be/IBANBIC.asmx/BBANtoIBAN?value=" & BBAN
Do While xd.readyState <> 4
    DoEvents
Loop
BBANtoIBAN = xd.Text
End Function
How can this be transferred to FWH ?

Thanks a lot for any help.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: VBA to FWH

Postby lailton.webmaster » Sun Jun 13, 2010 1:52 am

you need donwliad and install it:
http://download.microsoft.com/download/ ... /msxml.msi

so try it:

Code: Select all  Expand view
#include "fivewin.ch"
Function main()
  ? BBANtoIBAN( "YourStringHere" )
Return

Function BBANtoIBAN( BBAN )
Local xd, cProgID:="MSXML2.DOMDocument.4.0"
 if .not. isActiveX(cProgID)
    msgstop("You cant use "+cProgID+", it's not instaled.","Error: "+cProgID)
    quit
 endif
 xd:= CreateObject(cProgID)
 xd:Load( "http://www.ibanbic.be/IBANBIC.asmx/BBANtoIBAN?value=" + alltrim( BBAN ) )
 
 Do While xd:readyState <> 4
    sysRefresh()
 Enddo

return xd:text

:D
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: VBA to FWH

Postby driessen » Sun Jun 13, 2010 11:06 pm

Thank you very much for your help.

It works perfectly.

Great.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nnicanor and 19 guests