0% found this document useful (0 votes)
18 views3 pages

Kalkulator Luas dan Volume Sederhana

The document contains code snippets for calculating the area of a triangle, volume of a cylinder, and volume of a cube. It also contains code for basic input/output functions like buttons, text boxes, and messages. The code demonstrates basic Visual Basic applications and functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

Kalkulator Luas dan Volume Sederhana

The document contains code snippets for calculating the area of a triangle, volume of a cylinder, and volume of a cube. It also contains code for basic input/output functions like buttons, text boxes, and messages. The code demonstrates basic Visual Basic applications and functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Menghitung Luas Segitiga

CODING TOMBOL HITUNG

Private Sub cmdhitung_Click()


[Link] = Val([Link]) * ([Link]) / 2
End Sub

CODING TOMBOL BERSIH tombol keluar

Private Sub cmdberish_Click() Dim Pesan As String


[Link] = Clear Pesan = "Anda Ingin Exit ?"
[Link] = Clear x = MsgBox(Pesan, vbYesNo, "Konfirmasi")
[Link] = Clear If x = vbYes Then End
END SUB

End Sub

Volume tabung

Coding tombol proses


Private Sub Command1_Click()
Const pi As Double = 3.14
Dim r, t, vol As Double
r = Val([Link])
t = Val([Link])
vol = pi * (r * r) * t
[Link] = vol
End Sub

Coding tombol hapus/Bersih/Clear


Coding Tombol keluar /Exit Private Sub Command2_Click()
Dim Pesan As String [Link] = " "
Pesan = "Anda Ingin Exit ?" [Link] = " "
x = MsgBox(Pesan, vbYesNo, "Konfirmasi") [Link] = " "
If x = vbYes Then End End Sub
Coding memberikan warna, menebalkan dan
Aplikasi Menginputkan nama memiringkan tulisan:

Private Sub Check1_Click()


[Link] = [Link]
End Sub

Private Sub Check2_Click()


[Link] = [Link]
End Sub

Private Sub Option1_Click()


[Link] = vbRed
End Sub

Private Sub Option2_Click()


Coding Tombol Keluar [Link] = vbBlue
End Sub
Private Sub Command2_Click()
a = MsgBox("Apakah Anda Yakin Ingin Keluar?",
Coding tombol proses
vbYesNo + vbInformation, "Konfirmasi")
If a = vbYes Then End
Private Sub Command1_Click()
End Sub
[Link] = [Link]
End Sub

Kalkulator Sederhana

Coding tombol +
Private Sub Command1_Click()
[Link] = Val([Link]) + ([Link])
End Sub

Coding tombol -
Private Sub Command2_Click()
[Link] = Val([Link]) - ([Link])
End Sub

Coding tombol *
Coding Tombol Keluar Private Sub Command3_Click()
[Link] = Val([Link]) * ([Link])
Private Sub Command2_Click() End Sub
a = MsgBox("Apakah Anda Yakin Ingin Keluar?",
vbYesNo + vbInformation, "Konfirmasi") Coding tombol /
If a = vbYes Then End Private Sub Command4_Click()
End Sub [Link] = Val([Link]) / ([Link])
End Sub
Coding tombol hapus/Bersih/Clear
Private Sub Command2_Click()
[Link] = " "
[Link] = " "
[Link] = " "
End Sub
Menghitung Volume Kubus

Coding tombol Hitung/Proses:

Private Sub Command1_Click()


[Link] = Val([Link]) ^ 3
End Sub

Coding tombol hapus/Bersih/Clear


Private Sub Command2_Click()
[Link] = " "
[Link] = " "
End Sub

Coding Tombol Keluar

Private Sub Command2_Click()


a = MsgBox("Apakah Anda Yakin Ingin Keluar?",
vbYesNo + vbInformation, "Konfirmasi")
If a = vbYes Then End
End Sub

Tombol Login

Coding tombol login :


Private Sub Command1_Click()
If [Link] = "1234" Then
MsgBox " Selamat Datang! ", vbInformation
End If
End Sub

You might also like