Materi Perkuliahan

BUJUR SANGKAR AJAIB (VBA EXCEL)

Dipublikasikan pada : 29 Januari 2019.

Sub satu()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoFalse
lembar1.Shapes(“3”).Visible = msoFalse
lembar1.Shapes(“4”).Visible = msoFalse
lembar1.Shapes(“5”).Visible = msoFalse
lembar1.Shapes(“6”).Visible = msoFalse
lembar1.Shapes(“7”).Visible = msoFalse
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub dua()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoFalse
lembar1.Shapes(“4”).Visible = msoFalse
lembar1.Shapes(“5”).Visible = msoFalse
lembar1.Shapes(“6”).Visible = msoFalse
lembar1.Shapes(“7”).Visible = msoFalse
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub tiga()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoTrue
lembar1.Shapes(“4”).Visible = msoFalse
lembar1.Shapes(“5”).Visible = msoFalse
lembar1.Shapes(“6”).Visible = msoFalse
lembar1.Shapes(“7”).Visible = msoFalse
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub empat()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoTrue
lembar1.Shapes(“4”).Visible = msoTrue
lembar1.Shapes(“5”).Visible = msoFalse
lembar1.Shapes(“6”).Visible = msoFalse
lembar1.Shapes(“7”).Visible = msoFalse
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub lima()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoTrue
lembar1.Shapes(“4”).Visible = msoTrue
lembar1.Shapes(“5”).Visible = msoTrue
lembar1.Shapes(“6”).Visible = msoFalse
lembar1.Shapes(“7”).Visible = msoFalse
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub enam()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoTrue
lembar1.Shapes(“4”).Visible = msoTrue
lembar1.Shapes(“5”).Visible = msoTrue
lembar1.Shapes(“6”).Visible = msoTrue
lembar1.Shapes(“7”).Visible = msoFalse
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub tujuh()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoTrue
lembar1.Shapes(“4”).Visible = msoTrue
lembar1.Shapes(“5”).Visible = msoTrue
lembar1.Shapes(“6”).Visible = msoTrue
lembar1.Shapes(“7”).Visible = msoTrue
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub delapan()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoTrue
lembar1.Shapes(“4”).Visible = msoTrue
lembar1.Shapes(“5”).Visible = msoTrue
lembar1.Shapes(“6”).Visible = msoTrue
lembar1.Shapes(“7”).Visible = msoTrue
lembar1.Shapes(“8”).Visible = msoTrue
lembar1.Shapes(“9”).Visible = msoFalse
End Sub
Sub sembilan()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoTrue
lembar1.Shapes(“2”).Visible = msoTrue
lembar1.Shapes(“3”).Visible = msoTrue
lembar1.Shapes(“4”).Visible = msoTrue
lembar1.Shapes(“5”).Visible = msoTrue
lembar1.Shapes(“6”).Visible = msoTrue
lembar1.Shapes(“7”).Visible = msoTrue
lembar1.Shapes(“8”).Visible = msoTrue
lembar1.Shapes(“9”).Visible = msoTrue
End Sub
Sub hapus()
Dim lembar1 As Worksheet
Set lembar1 = Worksheets(1)
lembar1.Shapes(“1”).Visible = msoFalse
lembar1.Shapes(“2”).Visible = msoFalse
lembar1.Shapes(“3”).Visible = msoFalse
lembar1.Shapes(“4”).Visible = msoFalse
lembar1.Shapes(“5”).Visible = msoFalse
lembar1.Shapes(“6”).Visible = msoFalse
lembar1.Shapes(“7”).Visible = msoFalse
lembar1.Shapes(“8”).Visible = msoFalse
lembar1.Shapes(“9″).Visible = msoFalse
End Sub

[gview file=”https://dosen.ikipsiliwangi.ac.id/wp-content/uploads/sites/6/2019/01/LANGKAH-LANGKAH-PEMBUATAN-TUGAS-UAS.docx”]