Materi Perkuliahan

KONSEP JAJAR GENJANG VBA EXCEL

Dipublikasikan pada : 29 Januari 2019.

Sub rumus1()
Set lusiana = Worksheets(1)
lusiana.Shapes(“segitiga1”).Visible = msoTrue
lusiana.Shapes(“segitiga1.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2”).Visible = msoFalse
lusiana.Shapes(“segitiga2.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2.2”).Visible = msoFalse
lusiana.Shapes(“persegi”).Visible = msoTrue
lusiana.Shapes(“keterangan1”).Visible = msoTrue
lusiana.Shapes(“keterangan2”).Visible = msoFalse
lusiana.Shapes(“1”).Visible = msoTrue
lusiana.Shapes(“2”).Visible = msoFalse
lusiana.Shapes(“alas”).Visible = msoFalse
lusiana.Shapes(“tinggi”).Visible = msoFalse
lusiana.Shapes(“LUAS”).Visible = msoFalse
End Sub
Sub klik1()
Set lusiana = Worksheets(1)
lusiana.Shapes(“segitiga1”).Visible = msoFalse
lusiana.Shapes(“segitiga1.1”).Visible = msoTrue
lusiana.Shapes(“segitiga2”).Visible = msoFalse
lusiana.Shapes(“segitiga2.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2.2”).Visible = msoFalse
lusiana.Shapes(“persegi”).Visible = msoTrue
lusiana.Shapes(“keterangan1”).Visible = msoTrue
lusiana.Shapes(“keterangan2”).Visible = msoFalse
lusiana.Shapes(“1”).Visible = msoTrue
lusiana.Shapes(“2”).Visible = msoFalse
lusiana.Shapes(“alas”).Visible = msoFalse
lusiana.Shapes(“tinggi”).Visible = msoFalse
lusiana.Shapes(“LUAS”).Visible = msoFalse
End Sub
Sub rumus2()
Set lusiana = Worksheets(1)
lusiana.Shapes(“segitiga1”).Visible = msoFalse
lusiana.Shapes(“segitiga1.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2”).Visible = msoTrue
lusiana.Shapes(“segitiga2.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2.2”).Visible = msoTrue
lusiana.Shapes(“persegi”).Visible = msoFalse
lusiana.Shapes(“keterangan1”).Visible = msoFalse
lusiana.Shapes(“keterangan2”).Visible = msoTrue
lusiana.Shapes(“1”).Visible = msoFalse
lusiana.Shapes(“2”).Visible = msoTrue
lusiana.Shapes(“alas”).Visible = msoFalse
lusiana.Shapes(“tinggi”).Visible = msoFalse
lusiana.Shapes(“LUAS”).Visible = msoFalse
End Sub
Sub klik2()
Set lusiana = Worksheets(1)
lusiana.Shapes(“segitiga1”).Visible = msoFalse
lusiana.Shapes(“segitiga1.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2”).Visible = msoTrue
lusiana.Shapes(“segitiga2.1”).Visible = msoTrue
lusiana.Shapes(“segitiga2.2”).Visible = msoFalse
lusiana.Shapes(“persegi”).Visible = msoFalse
lusiana.Shapes(“keterangan1”).Visible = msoFalse
lusiana.Shapes(“keterangan2”).Visible = msoTrue
lusiana.Shapes(“1”).Visible = msoFalse
lusiana.Shapes(“2”).Visible = msoTrue
lusiana.Shapes(“alas”).Visible = msoFalse
lusiana.Shapes(“tinggi”).Visible = msoFalse
lusiana.Shapes(“LUAS”).Visible = msoFalse
End Sub
Sub hitung()
Set lusiana = Worksheets(1)
lusiana.Shapes(“segitiga1”).Visible = msoFalse
lusiana.Shapes(“segitiga1.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2”).Visible = msoTrue
lusiana.Shapes(“segitiga2.1”).Visible = msoTrue
lusiana.Shapes(“segitiga2.2”).Visible = msoFalse
lusiana.Shapes(“persegi”).Visible = msoFalse
lusiana.Shapes(“keterangan1”).Visible = msoFalse
lusiana.Shapes(“keterangan2”).Visible = msoFalse
lusiana.Shapes(“1”).Visible = msoFalse
lusiana.Shapes(“2”).Visible = msoFalse
lusiana.Shapes(“alas”).Visible = msoTrue
lusiana.Shapes(“tinggi”).Visible = msoTrue
lusiana.Shapes(“LUAS”).Visible = msoTrue
End Sub
Sub LUAS()
Range(“M10”) = Range(“J8”) * Range(“J11”)
Range(“N10”) = “CM^2”
Range(“d15”) = “L = a x t”
End Sub
Sub KEMBALI()
Set lusiana = Worksheets(1)
lusiana.Shapes(“segitiga1”).Visible = msoFalse
lusiana.Shapes(“segitiga1.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2”).Visible = msoFalse
lusiana.Shapes(“segitiga2.1”).Visible = msoFalse
lusiana.Shapes(“segitiga2.2”).Visible = msoFalse
lusiana.Shapes(“persegi”).Visible = msoFalse
lusiana.Shapes(“keterangan1”).Visible = msoFalse
lusiana.Shapes(“keterangan2”).Visible = msoFalse
lusiana.Shapes(“1”).Visible = msoFalse
lusiana.Shapes(“2”).Visible = msoFalse
lusiana.Shapes(“alas”).Visible = msoFalse
lusiana.Shapes(“tinggi”).Visible = msoFalse
End Sub
Sub HAPUS()
Range(“d15”) = “”
Range(“J8”) = “”
Range(“J11”) = “”
Range(“M10”) = “”
Range(“N10”) = “”
End Sub