Formunuza 2 Textbox ve 1 adet Command buton ekleyin...
Ve aşağıdaki kodu olduğu gibi formunuza ekleyin...
Dim Sayi As Integer
Private Sub Command1_Click()
On Error Resume Next
Text1 = Int(Text1)
If Text1 > 30000 Then Text1 = 30000
Text2 = ToBinary(Text1)
End Sub
Private Sub Form_Load()
Text1 = "": Text2 = "": Text2.Enabled = False
Command1.Caption = "Çevir"
End Sub
Public Function ToBinary(TBSayi As Integer) As String
If TBSayi < 2 Then
ToBinary = Trim(Str(TBSayi))
Else
ToBinary = ToBinary(Int(TBSayi / 2)) & Trim(Str(TBSayi Mod 2))
End If
End Function