FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour VBA to FWH
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
VBA to FWH
Posted: Sat Jun 12, 2010 11:30 AM
Hello,

Here is VBA-code to convert a traditional banking account number to IBAN :
Code (fw): Select all Collapse
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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Re: VBA to FWH
Posted: Sun Jun 13, 2010 01:52 AM
you need donwliad and install it:
http://download.microsoft.com/download/ ... /msxml.msi

so try it:

Code (fw): Select all Collapse
#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

:-)
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: VBA to FWH
Posted: 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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Continue the discussion