Materi Perkuliahan

MEDIA PEMBELAJARAN GAME SATUAN PANJANG BERBASIS INFORMATION COMMUNICATION AND TECHNOLOGI MICROSOFT EXCEL VISUAL BASIC APLICATION

Dipublikasikan pada : 29 Januari 2019.

Private Sub CommandButton1_Click()
ComboBox1 = “”
ComboBox2 = “”
TextBox1 = “”
TextBox2 = “”
End Sub

Private Sub CommandButton2_Click()
End
End Sub

Private Sub KONVERSI_Click()
Dim aa As Double
If ComboBox1.Text = “kw” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text * 100
Else
If ComboBox1.Text = “kw” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text * 1000
Else
If ComboBox1.Text = “kw” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text * 10000
Else
If ComboBox1.Text = “kw” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text * 100000
Else
If ComboBox1.Text = “kw” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text * 1000000
Else
If ComboBox1.Text = “kw” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text * 10000000
Else
If ComboBox1.Text = “kw” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text * 100000000
End If
End If
End If
End If
End If
End If
End If
If ComboBox1.Text = “kg” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text
Else
If ComboBox1.Text = “kg” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text * 10
Else
If ComboBox1.Text = “kg” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text * 100
Else
If ComboBox1.Text = “kg” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text * 1000
Else
If ComboBox1.Text = “kg” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text * 10000
Else
If ComboBox1.Text = “kg” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text * 100000
Else
If ComboBox1.Text = “kg” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text * 1000000
Else
If ComboBox1.Text = “kg” And ComboBox2.Text = “kw” Then
TextBox2.Text = TextBox1.Text / 100
End If
End If
End If
End If
End If
End If
End If
End If
If ComboBox1.Text = “hg” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text / 10
Else
If ComboBox1.Text = “hg” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text
Else
If ComboBox1.Text = “hg” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text * 10
Else
If ComboBox1.Text = “hg” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text * 100
Else
If ComboBox1.Text = “hg” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text * 1000
Else
If ComboBox1.Text = “hg” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text * 10000
Else
If ComboBox1.Text = “hg” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text * 100000
Else
If ComboBox1.Text = “hg” And ComboBox2.Text = “kw” Then
TextBox2.Text = TextBox1.Text / 1000
End If
End If
End If
End If
End If
End If
End If
End If
If ComboBox1.Text = “dag” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text / 100
Else
If ComboBox1.Text = “dag” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text / 10
Else
If ComboBox1.Text = “dag” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text
Else
If ComboBox1.Text = “dag” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text * 10
Else
If ComboBox1.Text = “dag” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text * 100
Else
If ComboBox1.Text = “dag” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text * 1000
Else
If ComboBox1.Text = “dag” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text * 10000
Else
If ComboBox1.Text = “dag” And ComboBox2.Text = “kw” Then
TextBox2.Text = TextBox1.Text / 10000
End If
End If
End If
End If
End If
End If
End If
End If
If ComboBox1.Text = “g” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text / 1000
Else
If ComboBox1.Text = “g” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text / 100
Else
If ComboBox1.Text = “g” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text / 10
Else
If ComboBox1.Text = “g” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text
Else
If ComboBox1.Text = “g” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text * 10
Else
If ComboBox1.Text = “g” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text * 100
Else
If ComboBox1.Text = “g” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text * 1000
Else
If ComboBox1.Text = “g” And ComboBox2.Text = “kw” Then
TextBox2.Text = TextBox1.Text / 100000
End If
End If
End If
End If
End If
End If
End If
End If
If ComboBox1.Text = “dg” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text / 10000
Else
If ComboBox1.Text = “dg” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text / 1000
Else
If ComboBox1.Text = “dg” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text / 100
Else
If ComboBox1.Text = “dg” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text / 10
Else
If ComboBox1.Text = “dg” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text
Else
If ComboBox1.Text = “dg” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text * 10
Else
If ComboBox1.Text = “dg” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text * 100
Else
If ComboBox1.Text = “dg” And ComboBox2.Text = “kw” Then
TextBox2.Text = TextBox1.Text / 1000000
End If
End If
End If
End If
End If
End If
End If
End If
If ComboBox1.Text = “cg” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text / 100000
Else
If ComboBox1.Text = “cg” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text / 10000
Else
If ComboBox1.Text = “cg” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text / 1000
Else
If ComboBox1.Text = “cg” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text / 100
Else
If ComboBox1.Text = “cg” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text / 10
Else
If ComboBox1.Text = “cg” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text
Else
If ComboBox1.Text = “cg” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text * 10
Else
If ComboBox1.Text = “cg” And ComboBox2.Text = “kw” Then
TextBox2.Text = TextBox1.Text / 10000000
End If
End If
End If
End If
End If
End If
End If
End If
If ComboBox1.Text = “mg” And ComboBox2.Text = “kg” Then
TextBox2.Text = TextBox1.Text / 1000000
Else
If ComboBox1.Text = “mg” And ComboBox2.Text = “hg” Then
TextBox2.Text = TextBox1.Text / 100000
Else
If ComboBox1.Text = “mg” And ComboBox2.Text = “dag” Then
TextBox2.Text = TextBox1.Text / 10000
Else
If ComboBox1.Text = “mg” And ComboBox2.Text = “g” Then
TextBox2.Text = TextBox1.Text / 1000
Else
If ComboBox1.Text = “mg” And ComboBox2.Text = “dg” Then
TextBox2.Text = TextBox1.Text / 100
Else
If ComboBox1.Text = “mg” And ComboBox2.Text = “cg” Then
TextBox2.Text = TextBox1.Text / 10
Else
If ComboBox1.Text = “mg” And ComboBox2.Text = “mg” Then
TextBox2.Text = TextBox1.Text
Else
If ComboBox1.Text = “mg” And ComboBox2.Text = “kw” Then
TextBox2.Text = TextBox1.Text / 100000000
End If
End If
End If
End If
End If
End If
End If
End If

End Sub

Private Sub UserForm_initialize()
With ComboBox1
.AddItem (“kw”)
.AddItem (“kg”)
.AddItem (“hg”)
.AddItem (“dag”)
.AddItem (“g”)
.AddItem (“dg”)
.AddItem (“cg”)
.AddItem (“mg”)
End With
With ComboBox2
.AddItem (“kw”)
.AddItem (“kg”)
.AddItem (“hg”)
.AddItem (“dag”)
.AddItem (“g”)
.AddItem (“dg”)
.AddItem (“cg”)
.AddItem (“mg”)
End With
End Sub

 

id_IDIndonesian