VB program to make a simple Registration form

Simple Registration from

Sample code:


Check the fields(Name,Birthday,Sex,Country) are not empty
and E-mail address is same


Private Sub Command1_Click()
    Dim b As Boolean
    b = True
    If Text1.Text = ""  Then
        b = False
        Text1.ForeColor = &HFF&
     End If

    If Val(Combo1.Text) < 32 And Val(Combo1.Text) > 0 Then
    Else
        b = False
        Combo1.ForeColor = &HFF&
    End If
    If Combo2.Text = ""  Then
        b = False
        Combo2.ForeColor = &HFF&
    End If
    If Val(Combo3.Text) < 1950 Or Val(Combo3.Text) > 2013 Then
        b = False
        Combo3.ForeColor = &HFF&
    End If

    If  Combo4.Text = "" Then
        b = False
     Combo4.ForeColor = &HFF&
     End If

     If Combo5.Text = "Male" Or Combo5.Text = "Female" Then
     Else
          b = False
          Combo5.ForeColor = &HFF&
     End If
     If b And Text2.Text = Text3.Text Then
          diagole = MsgBox("Registration Complete", vbOKOnly, "Sucess")
          End
     Else
           If b Then
                diagole = MsgBox("miss maching E-mail", vbRetryCancel, "error")
           Else
                diagole = MsgBox("Incomplete application", vbRetryCancel, "error")
           End If
      End If
End Sub

Cancel button- end


Private Sub Command2_Click()
    End
End Sub

Set Day (0~1) and Year(2013~1913)


Private Sub Form_Load()
    Dim i As Integer
    For i = 1 To 31
        Combo1.AddItem (Str(i))
    Next i
    i = 2013
    While i > 1913
        Combo3.AddItem (Str(i))
        i = i - 1
    Wend
End Sub

Full Code :

Output(Registration.exe)

Full code(Registration.doc)

Full project(Registration.vbp,.frm)

*Note Full project require Visual Basic 6.0