I'd rather not post a snippet of the code but I'll have to, you can use it as long as you promise me you'll study how it works and not just copy + paste, as that would be a cheap way out of it..... on the other hand heres the codles:
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