AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

How can I convert a deciaml number to a binary number?
Here's an easy to use function you can place anywhere in your code:

Public Function Binary(Number As Long) As String
If Abs(Number) > 1 Then
        Binary = Binary(Number \ 2) & CStr(Abs(Number Mod 2))
    Else
        Binary = CStr(Number)
End If
End Function

You can call it like this:

MsgBox Binary(1234)

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/