Categories

Thousands of experts bid on your personal project at ScriptLance.com

convert to binary

Public Function CBin(ByVal Nr As Long, Optional Precision As Integer = 8) As String
Do Until Nr = 0
CBin = CStr((Nr Mod 2)) + CBin
Nr = Nr 2
Loop
CBin = Format(Val(CBin), String(Precision, “0″))
End Function

Private Sub Form_Load()
MsgBox CBin(88)
End Sub

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

You must be logged in to post a comment.