Source Code:
Private Sub Command1_Click()
a = MsgBox("Nama Saya : " & Text1.Text & vbCrLf & "Alamat Saya : " & Text2.Text & vbCrLf & "Nomer Telpon saya : " & Text3.Text & vbCrLf & "Hobby saya :" & Text4.Text, vbInformation + vbOKCancel, "Biodata")
Me.Caption = "Biodata " & Text1.Text
If a = vbOK Then
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
Else
b = MsgBox("Apakah Anda Ingin Keluar ", vbQuestion + vbYesNo, "Konfirmasi")
If b = vbYes Then
End
Else
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
End If
End If
End Sub
Private Sub Command2_Click()
c = MsgBox("Apakah Anda Ingin Keluar ", vbQuestion + vbYesNo, "Konfirmasi")
If c = vbOK Then
End
Else
Text1.SetFocus
End If
End Sub
0 komentar:
Posting Komentar