Function dTOb(x As Integer)As String
Dim s As String
Do While x>0
If x Mod 2=0 Then s="0"Else s="1"
x=x\2
Loop
End Function