|
-
Feb 17th, 2000, 04:14 PM
#5
Hyperactive Member
Try this
Public Function Bin_conv(Byval value as long) as string
Dim multi As Long
Dim binary As Variant
multi = 0
binary = 0
If value > 2048 Then
msgbox = "**Overflow**"
Exit Function
End If
Do While (value > 0)
remainder = value Mod 2
value = Fix(value / 2)
If remainder = 1 Then binary = binary + 10 ^ multi
multi = multi + 1
Loop
Bin_conv = binary
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|