Materi Perkuliahan

Luas dan Keliling Menggunakan Excel (UserForm)

Dipublikasikan pada : 29 Januari 2019.

Private Sub CommandButton1_Click()
UserForm1.Show
End Sub

Private Sub CommandButton1_Click()
Dim phi, luas, Keliling As Double
phi = 22 / 7 Or 3.14
luas = phi * (TextBox1 * TextBox1)
Keliling = 2 * phi * TextBox1
TextBox2 = luas
TextBox3 = Keliling
TextBox1.SetFocus
MsgBox “luas lingkaran : ” & luas & vbCrLf & “Keliling : ” & Keliling, vbInformation, “hasil”
End Sub

Private Sub CommandButton2_Click()
End
End Sub

Private Sub CommandButton3_Click()
TextBox1 = “”
TextBox2 = “”
TextBox3 = “”
TextBox1.SetFocus
End Sub

Private Sub TextBox1_Change()

End Sub

[gview file=”https://dosen.ikipsiliwangi.ac.id/wp-content/uploads/sites/6/2019/01/laporan-uas-nadya.docx”]