Zebra0.com

visual-basic examplesProfessor Joy: CA125 Class Work

Professor Joy: CA125 Class Work

Class Work Week 9

Format a social security number as 123-45-6789
Private Sub BtnSoc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSoc.Click
        Dim s As String = InputBox("Enter Social Security Number:","Social Security Number", "123456789")
        If s.Length = 9 Then
            Me.Text = s.Substring(0, 3) & "-" & s.Substring(3, 2) & "-"& s.Substring(5)
        Else
            MsgBox("9 digits only", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "ERROR")
        End If
End Sub

This web site, and all pages therein, are the sole property and responsibility of Zebra0.com.
It is not endorsed, sponsored, or provided by or on behalf of Montgomery College.