tugas 3. program 1

PROGRAM 1 JONI 1

 

PROGRAM 1 :

  1. SCRIPT  1(MENGGUNAKAN  ENTER DAN PROSES)

Private Sub Command1_Click()

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

End If

TXTJURUSAN.Text = j

k = Mid(TXTNPM.Text, 4, 2)

If k = “01” Then

p = “STRATA SATU”

ElseIf k = “02” Then

p = “DIPLOMA TIGA”

ElseIf k = “03” Then

p = “DIPLOMA DUA”

ElseIf k = “04” Then

p = “DIPLOMA EMPAT”

End If

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 3)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTNPM.SetFocus

End If

End Sub

Private Sub TXTNPM_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

End If

TXTJURUSAN.Text = j

k = Mid(TXTNPM.Text, 4, 2)

If k = “01” Then

p = “STRATA SATU”

ElseIf k = “02” Then

p = “DIPLOMA TIGA”

ElseIf k = “03” Then

p = “DIPLOMA DUA”

ElseIf k = “04” Then

p = “DIPLOMA EMPAT”

End If

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 3)

End If

End Sub

 

 

 

PROGRAM 1 JONI 2

 

  1. CRIPT  2(MENGGUNAKAN ENTER)

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTNPM.SetFocus

End If

End Sub

Private Sub TXTNPM_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

End If

TXTJURUSAN.Text = j

k = Mid(TXTNPM.Text, 4, 2)

If k = “01” Then

p = “STRATA SATU”

ElseIf k = “02” Then

p = “DIPLOMA TIGA”

ElseIf k = “03” Then

p = “DIPLOMA DUA”

ElseIf k = “04” Then

p = “DIPLOMA EMPAT”

End If

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 3)

End If

End Sub

 

 

 

PROGRAM 1 JONI 1

  1. SCRIPT 3 (MENGGUNAKAN PROSES)

Private Sub Command1_Click()

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

End If

TXTJURUSAN.Text = j

k = Mid(TXTNPM.Text, 4, 2)

If k = “01” Then

p = “STRATA SATU”

ElseIf k = “02” Then

p = “DIPLOMA TIGA”

ElseIf k = “03” Then

p = “DIPLOMA DUA”

ElseIf k = “04” Then

p = “DIPLOMA EMPAT”

End If

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 3)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTNPM.SetFocus

End If

End Sub

 

 

by joni purnama

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s