Q:

VB Validate TextBox input to be Binary Number

I am trying to validate the input of a TextBox to make sure it is a Binary Number.   What I have so far is:
Private Sub Command1_Click()
 Dim b() As Byte
 b = Text1.Text

 If Not IsByte (b) Then
    Text3 = "Wrong input"
    Else
    Text3 = "CRC is generated"
  '  checksum. Text = Text1.Text Xor Text2.Text
   ' Trans(2).Text = (Text1.Text) + (checksum. Text)
 End If

Input in Text1 should only be accepting binary numbers, so only 1 or 0 should be allowed. 

A:

You can use Like here:
Private Sub Command1_Click()
    If Len(Text1.Text) = 0 Or Text1.Text Like "*[! 0-1]*" Then
        MsgBox "bad binary string"
    Else
        MsgBox "good binary string"
    End If
End Sub

This pattern is testing for "0 to many of anything, followed by one character not in the range 0 through 1, then 0 to many of anything."