Senin, 01 Juni 2015

Cara Mengerjakan Kasus Pada Visual Basic Dan Perhitungan Dengan Menggunakan Coding

LABORATORIUM AKUNTANSI LANJUT A
UNIVERSITAS GUNDARMA
LAPORAN AKHIR


NAMA            :  ROSSY RIZKY FADLY
KELAS           :  2EB25
NPM               :  28213104
KP                   :  ITA
TUTOR           :  WANDAH

                                                                                                    Paraf Asisten


                                                                                                (                             )


Cara Mengerjakan Kasus Pada Visual Basic Dan Perhitungan Dengan Menggunakan Coding

Microsoft Visual Basic adalah pemrograman yang berbasis GUI (Grafik User Interface). Dana dibawah ini adalah langkah-langkahnya cara membuat form akuntansi manajemen pada visual basic dan perhitungan dengan menggunakan coding :
1.      Pertama-tama buka Microsoft Visual Basic pada komputer dengan cara :
Klik Start – All Program - Microsoft Visual Basic 6.0 – Ok
2.      Setelah itu akan muncul halaman Microsoft Visual Basic
3.      Lalu klik open pada tampilan New Project dan setelah itu menampilkan icon maskedbox pada kolom general dengan langkah-langkah :
  a.       Klik kanan pada icon ole pada kolom general yang ada pada sebelah kiri halaman Microsoft Visual Basic
  b.      Klik components
  c.       Pada components terlihat beberapa pilihan pada menu controls lalu klik atau pilih Microsoft Masked Edit Control 6.0 lalu ok dan akan muncul icon dua tanda pagar dengan garis vertikal pada menu general 
4.      Sebelum mengerjakan kasus bab 2 buat dulu form yang sesuai pada kasus ini
5.      Setelah membuat form 1 dan form 2 lalu membuat codingnya dan menginput data-datanya dan berikut kasusnya

Kasus Bab 2
Penentuan HPP Dengan Metode Activity Based Costing

FORM 1
Private Sub cmdNext_Click()
Form1.Hide
Form2.Show
End Sub

Private Sub MaskedBox22_LostFocus()
MaskedBox29 = Val(MaskedBox1) + Val(MaskedBox8) + Val(MaskedBox15) + Val(MaskedBox22)
End Sub

Private Sub MaskedBox23_LostFocus()
MaskedBox30 = Val(MaskedBox2) + Val(MaskedBox9) + Val(MaskedBox16) + Val(MaskedBox23)
End Sub

Private Sub MaskedBox24_LostFocus()
MaskedBox31 = Val(MaskedBox3) + Val(MaskedBox10) + Val(MaskedBox17) + Val(MaskedBox24)
End Sub

Private Sub MaskedBox25_LostFocus()
MaskedBox32 = Val(MaskedBox4) + Val(MaskedBox11) + Val(MaskedBox18) + Val(MaskedBox25)
End Sub

Private Sub MaskedBox26_LostFocus()
MaskedBox33 = Val(MaskedBox5) + Val(MaskedBox12) + Val(MaskedBox19) + Val(MaskedBox26)
End Sub

Private Sub MaskedBox27_LostFocus()
MaskedBox34 = Val(MaskedBox6) + Val(MaskedBox13) + Val(MaskedBox20) + Val(MaskedBox27)
End Sub

Private Sub MaskedBox28_LostFocus()
MaskedBox35 = Val(MaskedBox7) + Val(MaskedBox14) + Val(MaskedBox21) + Val(MaskedBox28)
End Sub

Private Sub MaskedBox40_LostFocus()
MaskedBox41 = Val(MaskedBox37) + Val(MaskedBox38) + Val(MaskedBox39) + Val(MaskedBox40)
End Sub


FORM 2

Private Sub Command1_Click()
Form2.Hide
Form1.Show
End Sub

Private Sub Command2_Click()
Form2.Hide
Form3.Show
End Sub

Private Sub MaskedBox10_LostFocus()
MaskedBox10 = Val(MaskedBox8) / Val(MaskedBox9)
MaskedBox17 = Val(MaskedBox15) / Val(MaskedBox16)
MaskedBox24 = Val(MaskedBox22) / Val(MaskedBox23)
MaskedBox31 = Val(MaskedBox29) / Val(MaskedBox30)
End Sub

Private Sub MaskedBox2_LostFocus()
MaskedBox1 = Form1.MaskedBox41
MaskedBox2 = Form1.MaskedBox33
MaskedBox3 = Val(MaskedBox1) / Val(MaskedBox2)
End Sub
Private Sub MaskedBox32_LostFocus()
MaskedBox32 = Form1.MaskedBox37
MaskedBox35 = Form1.MaskedBox38
MaskedBox38 = Form1.MaskedBox39
MaskedBox41 = Form1.MaskedBox40
End Sub

Private Sub MaskedBox33_LostFocus()
MaskedBox34 = Val(Form1.MaskedBox37) / Val(Form1.MaskedBox31)
MaskedBox37 = Val(Form1.MaskedBox38) / Val(Form1.MaskedBox32)
MaskedBox40 = Val(Form1.MaskedBox39) / Val(Form1.MaskedBox33)
MaskedBox43 = Val(Form1.MaskedBox40) / Val(Form1.MaskedBox34)
End Sub

Private Sub MaskedBox4_LostFocus()
MaskedBox4 = Form1.MaskedBox2
MaskedBox11 = Form1.MaskedBox9
MaskedBox18 = Form1.MaskedBox16
MaskedBox25 = Form1.MaskedBox23
End Sub

Private Sub MaskedBox5_LostFocus()
MaskedBox5 = Val(Form1.MaskedBox36) * Val(Form1.MaskedBox7)
MaskedBox12 = Val(Form1.MaskedBox36) * Val(Form1.MaskedBox14)
MaskedBox19 = Val(Form1.MaskedBox36) * Val(Form1.MaskedBox21)
MaskedBox26 = Val(Form1.MaskedBox36) * Val(Form1.MaskedBox28)
End Sub

Private Sub MaskedBox6_LostFocus()
MaskedBox6 = Val(MaskedBox4) + Val(MaskedBox5)
MaskedBox13 = Val(MaskedBox11) + Val(MaskedBox12)
MaskedBox20 = Val(MaskedBox18) + Val(MaskedBox19)
MaskedBox27 = Val(MaskedBox25) + Val(MaskedBox26)
End Sub

Private Sub MaskedBox7_LostFocus()
MaskedBox7 = Val(Form1.MaskedBox5) * Val(MaskedBox3)
MaskedBox14 = Val(Form1.MaskedBox12) * Val(MaskedBox3)
MaskedBox21 = Val(Form1.MaskedBox19) * Val(MaskedBox3)
MaskedBox28 = Val(Form1.MaskedBox26) * Val(MaskedBox3)
End Sub

Private Sub MaskedBox8_LostFocus()
MaskedBox8 = Val(MaskedBox6) + Val(MaskedBox7)
MaskedBox15 = Val(MaskedBox13) + Val(MaskedBox14)
MaskedBox22 = Val(MaskedBox20) + Val(MaskedBox21)
MaskedBox29 = Val(MaskedBox27) + Val(MaskedBox28)
End Sub

Private Sub MaskedBox9_LostFocus()
MaskedBox9 = Form1.MaskedBox1
MaskedBox16 = Form1.MaskedBox8
MaskedBox23 = Form1.MaskedBox15
MaskedBox30 = Form1.MaskedBox22
End Sub

Private Sub MaskedBox36_LostFocus()
MaskedBox33 = Form1.MaskedBox31
MaskedBox36 = Form1.MaskedBox32
MaskedBox39 = Form1.MaskedBox33
MaskedBox42 = Form1.MaskedBox34
End Sub

FORM 3

Private Sub Command1_Click()
Form3.Hide
Form2.Show
End Sub

Private Sub Command2_Click()
Form3.Hide
End Sub

Private Sub MaskedBox1_LostFocus()
MaskedBox1 = Form2.MaskedBox6
MaskedBox9 = Form2.MaskedBox13
MaskedBox17 = Form2.MaskedBox20
MaskedBox25 = Form2.MaskedBox27
End Sub

Private Sub MaskedBox2_LostFocus()
MaskedBox2 = Val(Form1.MaskedBox3) * Val(Form2.MaskedBox34)
MaskedBox10 = Val(Form1.MaskedBox10) * Val(Form2.MaskedBox34)
MaskedBox18 = Val(Form1.MaskedBox17) * Val(Form2.MaskedBox34)
MaskedBox26 = Val(Form1.MaskedBox24) * Val(Form2.MaskedBox34)
End Sub

Private Sub MaskedBox3_LostFocus()
MaskedBox3 = Val(Form1.MaskedBox4) * Val(Form2.MaskedBox37)
MaskedBox11 = Val(Form1.MaskedBox11) * Val(Form2.MaskedBox37)
MaskedBox19 = Val(Form1.MaskedBox18) * Val(Form2.MaskedBox37)
MaskedBox27 = Val(Form1.MaskedBox25) * Val(Form2.MaskedBox37)
End Sub

Private Sub MaskedBox33_LostFocus()
MaskedBox33 = Form2.MaskedBox10
MaskedBox36 = Form2.MaskedBox17
MaskedBox39 = Form2.MaskedBox24
MaskedBox42 = Form2.MaskedBox31
End Sub

Private Sub MaskedBox34_LostFocus()
MaskedBox34 = Form3.MaskedBox8
MaskedBox37 = Form3.MaskedBox16
MaskedBox40 = Form3.MaskedBox24
MaskedBox43 = Form3.MaskedBox32
End Sub

Private Sub MaskedBox35_LostFocus()
MaskedBox35 = (Val(MaskedBox34) - Val(MaskedBox33) / Val(MaskedBox34)) * 100
MaskedBox38 = (Val(MaskedBox37) - Val(MaskedBox36) / Val(MaskedBox37)) * 100
MaskedBox41 = (Val(MaskedBox40) - Val(MaskedBox39) / Val(MaskedBox40)) * 100
MaskedBox44 = (Val(MaskedBox43) - Val(MaskedBox42) / Val(MaskedBox43)) * 100
End Sub

Private Sub MaskedBox4_LostFocus()
MaskedBox4 = Val(Form1.MaskedBox5) * Val(Form2.MaskedBox40)
MaskedBox12 = Val(Form1.MaskedBox12) * Val(Form2.MaskedBox40)
MaskedBox20 = Val(Form1.MaskedBox19) * Val(Form2.MaskedBox40)
MaskedBox28 = Val(Form1.MaskedBox26) * Val(Form2.MaskedBox40)
End Sub

Private Sub MaskedBox5_LostFocus()
MaskedBox5 = Val(Form1.MaskedBox6) * Val(Form2.MaskedBox43)
MaskedBox13 = Val(Form1.MaskedBox13) * Val(Form2.MaskedBox43)
MaskedBox21 = Val(Form1.MaskedBox20) * Val(Form2.MaskedBox43)
MaskedBox29 = Val(Form1.MaskedBox27) * Val(Form2.MaskedBox43)
End Sub

Private Sub MaskedBox6_LostFocus()
MaskedBox6 = Val(MaskedBox1) + Val(MaskedBox2) + Val(MaskedBox3) + Val(MaskedBox4) + Val(MaskedBox5)
MaskedBox14 = Val(MaskedBox9) + Val(MaskedBox10) + Val(MaskedBox11) + Val(MaskedBox12) + Val(MaskedBox13)
MaskedBox22 = Val(MaskedBox17) + Val(MaskedBox18) + Val(MaskedBox19) + Val(MaskedBox20) + Val(MaskedBox21)
MaskedBox30 = Val(MaskedBox25) + Val(MaskedBox26) + Val(MaskedBox27) + Val(MaskedBox28) + Val(MaskedBox29)
End Sub

Private Sub MaskedBox7_LostFocus()
MaskedBox7 = Form2.MaskedBox9
MaskedBox15 = Form2.MaskedBox16
MaskedBox23 = Form2.MaskedBox23
MaskedBox31 = Form2.MaskedBox30
End Sub

Private Sub MaskedBox8_LostFocus()
MaskedBox8 = Val(MaskedBox6) / Val(MaskedBox7)
MaskedBox16 = Val(MaskedBox14) / Val(MaskedBox15)
MaskedBox24 = Val(MaskedBox22) / Val(MaskedBox23)
MaskedBox32 = Val(MaskedBox30) / Val(MaskedBox31)

End Sub

Tidak ada komentar:

Posting Komentar