Membuat Aplikasi Akuntansi
MEMBUAT
JURNAL PENYESUAIAN
Untuk membuat Jurnal Penyesuaian sama seperti membuta jurnal umum, hanya mengganti
saja judul laporannya. Bentuk sheet Jurnal Penyesuaian dengan UserForm jurnal
Penyesuaian juga sama seperti Jurnal Umum. Sehingga anda dapat menyalin sheet dan
UserForm Jurnal Umum. Berikut contoh Sheet Jurnal Penyesuaian:
Untuk kode program dari masing-masing tombol dapat anda ketikkan sebagai berikut:
*Isi tombol Cetak
Private Sub cetak_Click()
Range("a6").Select
edit.Visible = False
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown).End(xlDown).Offset(2, 0)).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
ActiveSheet.PrintOut
Range("a1").Select
edit.Visible = True
menu.Visible = True
preview.Visible = True
cetak.Visible = True
48 HALAMAN
Membuat Aplikasi Akuntansi
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi tombol Ke-Menu
Private Sub menu_Click()
ActiveWorkbook.Unprotect
ActiveSheet.Unprotect
Sheets("Menu").Visible = True
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWorkbook.Protect Structure:=True, Windows:=False
End Sub
*Isi tombol Preview
Private Sub preview_Click()
ActiveSheet.Unprotect
Range("a6").Select
edit.Visible = False
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown).End(xlDown).CurrentRegion).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PaperSize = xlPaperLegal
49 HALAMAN
Membuat Aplikasi Akuntansi
.CenterHorizontally = True
.CenterVertically = True
.PrintTitleRows = ActiveSheet.Rows(10).Address
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
End With
Selection.PrintPreview
Range("a1").Select
edit.Visible = True
menu.Visible = True
preview.Visible = True
cetak.Visible = True
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi Perintah pada saat Worksheet aktif
Private Sub Worksheet_Activate()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("A10").Select
End Sub
*Isi tombol Edit
Private Sub Edit_Click()
frm_editJP.Show
End Sub
Mendesain UserForm Jurnal Penyesuaian
Untuk UserForm Jurnal Penyesuaian sama dengan Jurnal Umum, berikut contoh UserForm
Jurnal Penyesuaian:
50 HALAMAN
Membuat Aplikasi Akuntansi
Untuk kode program dari masing-masing tombol dapat anda ketikkan sebagai berikut:
Dim debit, kredit As Double
Private Sub kode_Click()
kode.Text = Left(kode.Text, 3)
End Sub
Private Sub ok_Click()
Sheets("Jurnal Penyesuaian").Select
Range("a8").Select
ActiveCell.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = nmr.Text
ActiveCell.HorizontalAlignment = xlCenter
bingkai_ju
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = tgl.Text
ActiveCell.NumberFormat = "dd-mmm-yy"
ActiveCell.HorizontalAlignment = xlCenter
bingkai_ju
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = kode.Text
51 HALAMAN
Membuat Aplikasi Akuntansi
ActiveCell.HorizontalAlignment = xlCenter
bingkai_ju
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=VLOOKUP(RC[-1],COA!R11C1:R140C2,2)"
ActiveCell.NumberFormat = "_ @"
bingkai_ju
If jenis.Text = "Debit" Then
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = jml.Text
debit = debit + Val(jml.Text)
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = 0
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
ElseIf jenis.Text = "Kredit" Then
ActiveCell.Offset(0, 2).Select
ActiveCell.Value = jml.Text
kredit = kredit + Val(jml.Text)
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
ActiveCell.Offset(0, -1).Select
ActiveCell.Value = 0
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
End If
debit = debit
kredit = kredit
kode.Text = kode.List(0)
jenis.Text = jenis.List(0)
jml.Text = ""
sebelum.Visible = True
52 HALAMAN
Membuat Aplikasi Akuntansi
berikut.Visible = True
End Sub
Private Sub tambah_Click()
If debit = kredit Then
tgl.Text = ""
kode.Text = kode.List(0)
jenis.Text = jenis.List(0)
jml.Text = ""
Range("a8").Select
ActiveCell.End(xlDown).Select
If Val(Right(ActiveCell.Value, 2)) > 0 And Val(Right(ActiveCell.Value, 2)) <= 8 Then
nmr.Text = "JP000" & Val(Right(ActiveCell.Value, 1)) + 1
ElseIf Val(Right(ActiveCell.Value, 2)) >= 9 And Val(Right(ActiveCell.Value, 2)) <= 98
Then
nmr.Text = "JP00" & Val(Right(ActiveCell.Value, 2)) + 1
ElseIf Val(Right(ActiveCell.Value, 3)) >= 99 And Val(Right(ActiveCell.Value, 3)) <= 998
Then
nmr.Text = "JP0" & Val(Right(ActiveCell.Value, 3)) + 1
ElseIf Val(Right(ActiveCell.Value, 3)) >= 999 Then
nmr.Text = "JP" & Val(Right(ActiveCell.Value, 4)) + 1
End If
Else
MsgBox "Transaksi tidak seimbang!", vbOKOnly + vbInformation, "Konfirmasi"
sebelum.Visible = True
ok.Visible = True
tambah.Visible = False
tutup.Visible = True
End If
End Sub
Private Sub tutup_Click()
Range("a9").Select
53 HALAMAN
Membuat Aplikasi Akuntansi
tanya = MsgBox("Apakah Jurnal sudah selesai?", vbYesNo, "Konfirmasi Jurnal
Penyesuaian")
If tanya = vbYes Then
ActiveCell.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
Range(ActiveCell, ActiveCell.Offset(0, 3)).MergeCells = True
ActiveCell.Value = "Jumlah"
ActiveCell.HorizontalAlignment = xlCenter
ActiveCell.Font.Bold = True
Selection.Borders.LineStyle = xlDouble
Selection.Borders.ColorIndex = 1
Selection.Interior.ColorIndex = 48
ActiveCell.Offset(-1, 1).Select
Range(ActiveCell, ActiveCell.End(xlUp).Offset(1, 0)).Select
Selection.Name = "Debit"
tot1 = Application.Sum(Range("debit"))
ActiveCell.End(xlDown).Offset(1, 0).Select
ActiveCell.Value = tot1
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
Selection.Borders.LineStyle = xlDouble
Selection.Borders.ColorIndex = 1
Selection.Interior.ColorIndex = 48
ActiveCell.Font.Bold = True
ActiveCell.Offset(-1, 1).Select
Range(ActiveCell, ActiveCell.End(xlUp).Offset(1, 0)).Select
Selection.Name = "Kredit"
tot2 = Application.Sum(Range("Kredit"))
ActiveCell.End(xlDown).Offset(1, 0).Select
ActiveCell.Value = tot2
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
Selection.Borders.LineStyle = xlDouble
Selection.Borders.ColorIndex = 1
Selection.Interior.ColorIndex = 48
54 HALAMAN
Membuat Aplikasi Akuntansi
ActiveCell.Font.Bold = True
Range("a9").EntireRow.Insert
Range("a9:f9").Borders(xlEdgeTop).LineStyle = xlNone
Range("a1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("Jurnal Penyesuaian").Visible = True
frm_JP.Hide
Else
End
frm_JP.Hide
End If
End Sub
Private Sub UserForm_Activate()
ActiveWorkbook.Unprotect
Sheets("Jurnal Penyesuaian").Activate
ActiveSheet.Unprotect
Range("a8").Select
ActiveCell.End(xlDown).Select
If Val(Right(ActiveCell.Value, 2)) > 0 And Val(Right(ActiveCell.Value, 2)) <= 8 Then
nmr.Text = "JP000" & Val(Right(ActiveCell.Value, 1)) + 1
ElseIf Val(Right(ActiveCell.Value, 2)) >= 9 And Val(Right(ActiveCell.Value, 2)) <= 98 Then
nmr.Text = "JP00" & Val(Right(ActiveCell.Value, 2)) + 1
ElseIf Val(Right(ActiveCell.Value, 3)) >= 99 And Val(Right(ActiveCell.Value, 3)) <= 998
Then
nmr.Text = "JP0" & Val(Right(ActiveCell.Value, 3)) + 1
ElseIf Val(Right(ActiveCell.Value, 3)) >= 999 Then
nmr.Text = "JP" & Val(Right(ActiveCell.Value, 4)) + 1
ElseIf Left(ActiveCell.Value, 2) <> "JU" Then
nmr.Text = "JP000" & "1"
End If
End Sub
55 HALAMAN
Membuat Aplikasi Akuntansi
Private Sub UserForm_Initialize()
kode.RowSource = "coa!f11:f140"
jenis.AddItem "Debit"
jenis.AddItem "Kredit"
End Sub
Private Sub berikut_Click()
ActiveCell.End(xlToLeft).Offset(1, 0).Select
If nmr.Text <> ActiveCell.Value Then
berikut.Enabled = False
sebelum.Enabled = True
ActiveCell.Offset(-1, 0).Select
Else
nmr.Text = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
tgl.Text = Format(ActiveCell.Value, "dd-mmm-yy")
ActiveCell.Offset(0, 1).Select
kode.Text = ActiveCell.Value
ActiveCell.Offset(0, 2).Select
If ActiveCell.Value <> 0 Then
jml.Text = ActiveCell.Value
jenis.Text = "debit"
Else
ActiveCell.Offset(0, 1).Select
jml.Text = ActiveCell.Value
jenis.Text = "Kredit"
End If
berikut.Enabled = True
End If
berikut.Enabled = False
sebelum.Enabled = True
End Sub
56 HALAMAN
Membuat Aplikasi Akuntansi
Private Sub sebelum_Click()
ActiveCell.End(xlToLeft).Offset(-1, 0).Select
If nmr.Text <> ActiveCell.Value Then
sebelum.Enabled = False
berikut.Visible = True
ActiveCell.Offset(1, 0).Select
Else
nmr.Text = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
tgl.Text = Format(ActiveCell.Value, "dd-mmm-yy")
ActiveCell.Offset(0, 1).Select
kode.Text = ActiveCell.Value
ActiveCell.Offset(0, 2).Select
If ActiveCell.Value <> 0 Then
jml.Text = ActiveCell.Value
jenis.Text = "Debit"
Else
ActiveCell.Offset(0, 1).Select
jml.Text = ActiveCell.Value
jenis.Text = "Kredit"
End If
sebelum.Enabled = True
End If
berikut.Enabled = True
sebelum.Enabled = False
End Sub
Mendesain UserForm Edit Jurnal Penyesuaian
Untuk pembuatan Userform Edit Jurnal Penyesuaian berikut kode programnya sama
seperti pada Edit Jurnal Umum, hanya mengganti sheet tujuannya saja.
57 HALAMAN
Membuat Aplikasi Akuntansi
Untuk kode program dari masing-masing tombol dapat anda ketikkan sebagai berikut:
*Isi tombol berikut
Private Sub berikut_Click()
sebelum.Enabled = True
ActiveCell.End(xlToLeft).Offset(1, 0).Select
If ActiveCell.Value <> nmr.Text Then
berikut.Enabled = False
sebelum.Enabled = True
ActiveCell.Offset(-1, 0).Select
Else
nmr.Text = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
tgl.Text = Format(ActiveCell.Value, "dd-mmm-yy")
ActiveCell.Offset(0, 1).Select
kode.Text = ActiveCell.Value
ActiveCell.Offset(0, 2).Select
If ActiveCell.Value <> 0 Then
jml.Text = ActiveCell.Value
jenis.Text = "debit"
Else
ActiveCell.Offset(0, 1).Select
jml.Text = ActiveCell.Value
58 HALAMAN
Membuat Aplikasi Akuntansi
jenis.Text = "Kredit"
End If
berikut.Enabled = True
End If
berikut.Enabled = False
sebelum.Enabled = True
End Sub
Private Sub kode_Change()
kode.Text = Left(kode.Text, 3)
End Sub
*Isi perintah setelah nomor jurnal dimasukkan
Private Sub nmr_AfterUpdate()
nomor = nmr.Text
Sheets("Jurnal Penyesuaian").Range("a1").Select
Set cr = Cells.Find(nomor, LookIn:=xlFormulas)
If cr Is Nothing Then
MsgBox "Nomor Jurnal tidak ada!", vbOKOnly + vbInformation, "Konfirmasi"
nmr.SetFocus
tgl.Enabled = False
Else
Sheets("Jurnal Penyesuaian").Cells.Find(nomor, LookIn:=xlFormulas).Activate
ActiveCell.Offset(0, 1).Select
tgl.Enabled = True
tgl.Text = Format(ActiveCell.Value, "DD-MMM-YY")
ActiveCell.Offset(0, 1).Select
kode.Text = ActiveCell.Value
ActiveCell.Offset(0, 2).Select
If ActiveCell.Value <> 0 Then
jml.Text = ActiveCell.Value
jenis.Text = "Debit"
Else
59 HALAMAN
Membuat Aplikasi Akuntansi
ActiveCell.Offset(0, 1).Select
jml.Text = ActiveCell.Value
jenis.Text = "Kredit"
End If
End If
berikut.Enabled = True
sebelum.Enabled = False
End Sub
*Isi tombol sebelum
Private Sub sebelum_Click()
berikut.Enabled = False
ActiveCell.End(xlToLeft).Offset(-1, 0).Select
If ActiveCell.Value <> nmr.Text Then
sebelum.Enabled = False
berikut.Enabled = True
ActiveCell.Offset(1, 0).Select
Else
nmr.Text = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
tgl.Text = Format(ActiveCell.Value, "dd-mmm-yy")
ActiveCell.Offset(0, 1).Select
kode.Text = ActiveCell.Value
ActiveCell.Offset(0, 2).Select
If ActiveCell.Value <> 0 Then
jml.Text = ActiveCell.Value
jenis.Text = "Debit"
Else
ActiveCell.Offset(0, 1).Select
jml.Text = ActiveCell.Value
jenis.Text = "Kredit"
End If
sebelum.Enabled = True
60 HALAMAN
Membuat Aplikasi Akuntansi
End If
berikut.Enabled = True
sebelum.Enabled = False
End Sub
*Isi tombol simpan
Private Sub Simpan_Click()
Sheets("Jurnal Penyesuaian").Unprotect
ActiveCell.End(xlToLeft).Select
ActiveCell.Value = nmr.Text
ActiveCell.HorizontalAlignment = xlCenter
bingkai_ju
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = tgl.Text
ActiveCell.NumberFormat = "dd-mmm-yy"
ActiveCell.HorizontalAlignment = xlCenter
bingkai_ju
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = kode.Text
ActiveCell.HorizontalAlignment = xlCenter
bingkai_ju
If jenis.Text = "Debit" Then
ActiveCell.Offset(0, 2).Select
ActiveCell.Value = jml.Text
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = 0
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
ElseIf jenis.Text = "Kredit" Then
ActiveCell.Offset(0, 3).Select
ActiveCell.Value = jml.Text
61 HALAMAN
Membuat Aplikasi Akuntansi
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
ActiveCell.Offset(0, -1).Select
ActiveCell.Value = 0
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_ju
End If
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("a1").Select
End
End Sub
*Mengisi data pilihan pada combo box kode dan tipe
Private Sub UserForm_Initialize()
kode.RowSource = "coa!f11:f140"
jenis.AddItem "Debit"
jenis.AddItem "Kredit"
End Sub
MEMBUAT
NERACA LAJUR
Neraca lajur terdiri dari 1 (satu) bagian saja, yaitu bagian sheet. Neraca lajur yang dibuat
pada contoh ini adalah neraca lajur 10 (sepuluh) kolom, yang terdiri dari Neraca Saldo,
Penyesuaian, Neraca Saldo Setelah penyesuaian, Rugi Laba dan Neraca. Untuk lebih
jelasnya dapat anda diperhatikan desain sheet Neraca Lajur seperti pada Gambar dibawah.
Dengan default sheet Neraca Lajur adalah tidak ditampilkan atau disembunyikan.
Neraca lajur secara otomatis terisi pada saat memasukkan nomor dan nama perkiraan
pada sheet COA
62 HALAMAN
Membuat Aplikasi Akuntansi
Menambah Tombol Perintah pada Sheet Neraca Lajur.
Ada tiga tombol perintah dalam sheet Neraca Lajur, yaitu Ke-Menu, Preview dan Cetak.
Cara pembuatan dan mengisi tombol perintah sama seperti pada bagian lainnya.
Sedangkan kode program untuk masing-masing tombol dapat anda ketikkan sebagai
berikut:
*Isi tombol Cetak
Private Sub cetak_Click()
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown)).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
ActiveSheet.PrintOut
Range("a1").Select
menu.Visible = True
preview.Visible = True
cetak.Visible = True
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi tombol Ke Menu
Private Sub menu_Click()
63 HALAMAN
Membuat Aplikasi Akuntansi
ActiveWorkbook.Unprotect
ActiveSheet.Unprotect
Sheets("Menu").Visible = True
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWorkbook.Protect Structure:=True, Windows:=False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
*Isi tombol Preview
Private Sub preview_Click()
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown).CurrentRegion).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.LeftMargin = 0.25
.RightMargin = 0.25
.CenterHorizontally = True
.CenterVertically = True
.PrintTitleRows = ActiveSheet.Rows(10).Address
.Zoom = False
64 HALAMAN
Membuat Aplikasi Akuntansi
.FitToPagesTall = 1
.FitToPagesWide = 1
End With
Selection.PrintPreview
Range("a1").Select
menu.Visible = True
preview.Visible = True
cetak.Visible = True
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi perintah pada saat Worksheet aktif
Private Sub Worksheet_Activate()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("A11").Select
End Sub
MEMBUAT
LAPORAN LABA RUGI
Laporan Rugi Laba terdiri dari 1 (satu) bagian sheet saja. Isi dari Laporan Rugi Laba
pada perusahaan JASA DAN DAGANG berbeda. Laporan Rugi Laba pada perusahaan JASA
dapat terdiri dari 3 (tiga) kolom, sedangkan pada perusahaan DAGANG dapat terdiri dari 4
(empat) kolom. Untuk jumlah barisnya tergantung dari jumlah akun yang digunakan dalam
Rugi Laba. Sheet Laporan Rugi Laba nilai defaultnya disembunyikan.
Rumus mengisi perkiraan Pendapatan usaha
='NERACA LAJUR'!B27
(Rumus ini dapat disalin ke bawah, jika perkiraan pendapatn lebih dari 1 (satu) dan
letaknya berurutan)
Rumus mengisi perkiraan Beban Usaha
='NERACA LAJUR'!B28
(Copy atau salin rumus ke bawah sesuai dengan jumlah perkiraan Beban usaha yang
terdapat dalam Neraca Lajur)
65 HALAMAN
Membuat Aplikasi Akuntansi
Rumus Pendapatan
='NERACA LAJUR'!J27
Rumus Beban usaha
='NERACA LAJUR'!I28
(Salin rumus sampai Beban Usaha yang terakhir)
Rumus Laba Bersih Sebelum Pajak
=C13-C15
(Didapat dari Pendapatan dikurangi Jumlah Beban Usaha)
Rumus Beban Pajak Penghasilan
Ketentuan Pajak Penghasilan untuk badan usaha adalah sebagai berikut:
Ket = PKP merupakan Penghasilan Kena Pajak yang didapat dari penghasilan Kotor
dikurangi dengan biaya yang dikeluarkan oleh perusahaan.
Rumus Beban Pajak Penghasilan Sebagai berikut:
=IF(C32<0;0;IF(C32<4800000000;C32*1%;IF(C32<=50000000000;(0,25-(600000000*C13))
*C32;25%*C32)))
Rumus Laba Bersih Setelah Pajak
=E32-E33
(Didapat dari laba Sebelum Pajak Dikurangi Beban Pajak Penghasilan)
Sedangkan rumus pada laporan rugi laba perusahaan dagang dapat anda lihat pada
file contoh yang terdapat dalam CD Penyerta.
Catatan
Setelah semua rumus selesai dimasukkan, selanjutnya format sel yang berisi rumus
menggunakan format Number-Custom dengan langkah sebagai berikut:
BLok atau pilih sel yang akan diformat pada tabel Rugi Laba.
Klik tombol dialog group Number, sehingga akan ditampilkan kotak dialog Format-
Cells-Number.
Pada bagian kategori pilih Custom dan pad daftar Type pilih format seperti dibawah:
_-Rp* #.##0,00_-;-Rp* #.##0,00_-;_-Rp* "-"??_-;_-@_-
Bentuk format ini digunakan untuk memformat angka atau bilangan positif, negatif, nol
(0) dan teks.
66 HALAMAN
Membuat Aplikasi Akuntansi
Klik tombol OK.
Laporan Rugi Laba Perusahaan Jasa
67 HALAMAN
Membuat Aplikasi Akuntansi
Menambah Tombol Perintah pada Sheet Rugi Laba.
Dalam sheet Rugi Laba terdapat 3 (tiga) tombol perintah, yaitu Ke-Menu, Preview, dan
Cetak. Cara pembuatan dan mengisi tombol perintah sama seperti pada bagian lainnya,
sedangkan untuk mengisi masing-masing tombol dapat diketikkan kode program sebagai
berikut:
*Isi tombol Cetak
Private Sub cetak_Click()
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown).End(xlDown).CurrentRegion).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
ActiveSheet.PrintOut
Range("a1").Select
ActiveSheet.PageSetup.PrintArea = Clear
menu.Visible = True
preview.Visible = True
cetak.Visible = True
End Sub
*Isi tombol Ke-Menu
Private Sub menu_Click()
ActiveWorkbook.Unprotect
Sheets("Menu").Visible = True
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
68 HALAMAN
Membuat Aplikasi Akuntansi
ActiveWindow.DisplayWorkbookTabs = False
ActiveWorkbook.Protect Structure:=True, Windows:=False
End Sub
*Isi tombol Preview
Private Sub preview_Click()
ActiveSheet.Unprotect
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown).End(xlDown).CurrentRegion).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PaperSize = xlPaperLegal
.CenterHorizontally = True
.CenterVertically = False
End With
Selection.PrintPreview
Range("a1").Select
ActiveSheet.PageSetup.PrintArea = Clear
menu.Visible = True
preview.Visible = True
cetak.Visible = True
End Sub
*Isi perintah pada saat worksheet aktif
Private Sub Worksheet_Activate()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
69 HALAMAN
Membuat Aplikasi Akuntansi
MEMBUAT
LAPORAN PERUBAHAN MODAL
Sama halnya dengan Rugi Laba, Laporan Perubahan Modal juga terdiri dari 1 (satu)
bagian sheet saja. Bentuk table Laporan Perubahan Modal dapat anda lihat pada gambar
dibawah ini:
Pengisian kolom pada Laporan Perubahan Modal bersumber dari COA dan Neraca Lajur.
Rumus yang dimasukkan dalam Laporan Perubahan Modal adalah sebagai berikut:
Rumus Modal Awal
=COA!D24
Rumus Laba Bersih
=NERACA LAJUR!I38
Rumus Prive
=NERACA LAJUR!K25
Rumus Penambahan / Pengurangan Modal
=B11-B12
(didapat Dari pengurangan antara Laba Bersih dengan Prive)
Rumus Modal Akhir
=C9+C13
Menambah Tombol Perintah pada Sheet Perubahan Modal
Pada sheet Perubahan Modal juga terdapat 3 tombol perintah yaitu Ke Menu, Preview dan
Cetak. Cara pembuatan dan mengisi tombol perintah sama seperti pada bagian lainnya.
Sedangkan kode program untuk masing-masing tombol perintah adalah sebagai berikut:
70 HALAMAN
Membuat Aplikasi Akuntansi
*Isi tombol Cetak
Private Sub cetak_Click()
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown)).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
ActiveSheet.PrintOut
Range("a1").Select
menu.Visible = True
preview.Visible = True
cetak.Visible = True
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi tombol Ke Menu
Private Sub menu_Click()
ActiveWorkbook.Unprotect
Sheets("Menu").Visible = True
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWorkbook.Protect Structure:=True, Windows:=False
End Sub
*Isi tombol Preview
71 HALAMAN
Membuat Aplikasi Akuntansi
Private Sub preview_Click()
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown)).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PaperSize = xlPaperLegal
.CenterHorizontally = True
.CenterVertically = False
End With
Selection.PrintPreview
Range("a1").Select
menu.Visible = True
preview.Visible = True
cetak.Visible = True
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi perintah pada saat worksheet aktif
Private Sub Worksheet_Activate()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
MEMBUAT
NERACA
Neraca juga terdiri dari 1 (satu) bagian sheet saja. Bentuk table Neraca terdiri dari 4
kolom, yaitu Kode, Keterangan, Debet dan Kredit. Sedangkan sumber datanya diambilkan
dari Neraca Lajur. Untuk desain sheet Neraca dapat dilihat pada gambar dibawah ini:
72 HALAMAN
Membuat Aplikasi Akuntansi
Rumus kolom Kode
=IF(COA!A11<>””,COA!A11””)
Rumus kolom Keterangan
=IF(COA!B11<>””,COA!B11””)
Rumus kolom Debet
=’NERACA LAJUR’!K11
Rumus kolom Kredit
=’NERACA LAJUR’!L11
Rumus Laba Usaha
=IF(D180>C180;D180-C180;0)
(Khusus kolom Debet)
=IF(C180>D180;C180-D180;0)
(Khusus kolom kredit)
Menambah Tombol Perintah pada Sheet Neraca
Sheet Neraca mempunyai 3 tombol perintah, yaitu Ke Menu, Preview dan Cetak. Cara
pembuatan dan mengisi tombol perintah juga sama seperti pada bagian lainnya.
Sedangkan kode program untuk masing-masing tombol perintah adalah sebagai berikut:
73 HALAMAN
Membuat Aplikasi Akuntansi
*Isi tombol Cetak
Private Sub cetak_Click()
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown)).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
ActiveSheet.PrintOut
Range("a1").Select
menu.Visible = True
preview.Visible = True
cetak.Visible = True
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi tombol Ke Menu
Private Sub menu_Click()
ActiveWorkbook.Unprotect
ActiveSheet.Unprotect
Range("a9").Select
'ActiveCell.End(xlDown).Select
'Range(ActiveCell, ActiveCell.Offset(-2, 2)).Select
'Selection.Rows.Delete
'Range(Selection, Selection.End(xlUp)).Select
'Selection.Rows.Hidden = False
Sheets("Menu").Visible = True
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
74 HALAMAN
Membuat Aplikasi Akuntansi
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWorkbook.Protect Structure:=True, Windows:=False
'frm_utama.Show
End Sub
*Isi tombol Preview
Private Sub preview_Click()
Range("a6").Select
menu.Visible = False
preview.Visible = False
cetak.Visible = False
Range(ActiveCell, ActiveCell.End(xlDown)).Select
ActiveSheet.PageSetup.PrintArea = Selection.Address
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PaperSize = xlPaperLegal
.CenterHorizontally = True
.CenterVertically = False
End With
Selection.PrintPreview
Range("a1").Select
menu.Visible = True
preview.Visible = True
cetak.Visible = True
ActiveSheet.PageSetup.PrintArea = Clear
End Sub
*Isi perintah pada saat worksheet aktif
Private Sub Worksheet_Activate()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("A10").Select
75 HALAMAN
Membuat Aplikasi Akuntansi
'ActiveWindow.FreezePanes = True
End Sub
MEMBUAT
SHEET MENU
Sheet Menu merupakan tampilan sheet utama dari aplikasi akuntansi Excel. Sheet ini
berfungsi sebagai navigasi atau petunjuk dalam mengerjakan Akuntansi Excel secara
berurutan. Sheet menu berisi beberapa tombol perintah dan objek sebagai penunjang
tampilan.
Mendesain Sheet Menu
Sheet menu terdiri dari :
Tombol-tombol perintah yang sama seperti pada bagian-bagian sheet Jurnal Umum,
Buku Besar adan sebagainya.
Objek WordArt untuk menuliskan Judul.
Objek Arrow untuk membuat tanda panah
Mengisi Tombol Perintah Pada Sheet Menu
Dalam sheet menu terdapat 9 (Sembilan) tombol perintah, yaitu Info, COA, Jurnal
Umum, Buku Besar, Jurnal Penyesuaian, Neraca Lajur, Rugi Laba, Perubahan Modal,
Perubahan Modal dan Neraca. Sebelum mengetikkan kode program untuk mengisi tombol
perintah pada sheet Menu, maka sisipkan sebuah Module pada jendela sheet Menu, maka -
76 HALAMAN
Membuat Aplikasi Akuntansi
→klik menu Insert Module, kemudian diketikkan kode program pada jendela Visual Basic
Module1 sebagai berikut:
S*Isi prosedur bingkai jurnal
Public Sub bingkai_ju()
With ActiveCell.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 1
.Weight = xlMedium
End With
With ActiveCell.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 1
.Weight = xlMedium
End With
End Sub
*Isi prosedur bingkai neraca
Public Sub bingkai_nl()
With Selection.Font
.Bold = True
.Size = 11
End With
With Selection.Borders
.LineStyle = xlDouble
.ColorIndex = 1
End With
Selection.Interior.ColorIndex = 48
End Sub
*Isi tombol Chart Of Account
Sub coa()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
77 HALAMAN
Membuat Aplikasi Akuntansi
Sheets("COA").Visible = True
Sheets("Menu").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
Sheets("coa").Select
Range("A1").Select
tambah = MsgBox("Tambah data?", vbYesNo)
If tambah = vbYes Then
frm_COA.Show
Else
Range("a9").Select
End If
End Sub
*Isi tombol Info Perusahaan
Sub info()
ActiveWorkbook.Unprotect
Sheets("Menu").Visible = True
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
ActiveWindow.DisplayWorkbookTabs = False
78 HALAMAN
Membuat Aplikasi Akuntansi
frm_info.Show
End Sub
*Isi tombol jurnal umum
Sub jum()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Jurnal").Visible = True
Sheets("Menu").Visible = False
Sheets("COA").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
Sheets("Jurnal").Activate
ActiveSheet.Unprotect
Range("A10").Select
ActiveCell.End(xlDown).Select
If ActiveCell.Value <> "Jumlah" Then
frm_JU.Show
Else
Range("a6").Select
ActiveSheet.Unprotect
End If
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
*Isi tombol Jurnal Penyesuaian
Sub jup()
ActiveWorkbook.Unprotect
79 HALAMAN
Membuat Aplikasi Akuntansi
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Jurnal Penyesuaian").Visible = True
Sheets("Menu").Visible = False
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
Sheets("Jurnal Penyesuaian").Activate
ActiveSheet.Unprotect
Range("A10").Select
ActiveCell.End(xlDown).Select
If ActiveCell.Value <> "Jumlah" Then
frm_JP.Show
Else
Range("a6").Select
ActiveSheet.Unprotect
End If
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
*Isi tombol Buku Besar
Sub besar()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Buku Besar").Visible = True
Sheets("Menu").Visible = False
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
80 HALAMAN
Membuat Aplikasi Akuntansi
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
Sheets("Buku Besar").Activate
Range("A1").Select
frm_bkbesar.Show
End Sub
*Isi tombol Neraca Lajur
Sub lajur()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Neraca Lajur").Visible = True
Sheets("Menu").Visible = False
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
Sheets("Neraca Lajur").Activate
ActiveSheet.Unprotect
Range("A11").Select
ActiveCell.End(xlDown).Select
If ActiveCell.Value <> "J U M L A H" Then
tanya = MsgBox("Neraca Lajur akan ditutup?", vbYesNo, "Penutupan Neraca Lajur")
If tanya = vbYes Then
ActiveCell.Offset(1, 0).Select
Range(ActiveCell, ActiveCell.Offset(0, 1)).Select
Selection.MergeCells = True
81 HALAMAN
Membuat Aplikasi Akuntansi
Selection.Value = "J U M L A H"
ActiveCell.HorizontalAlignment = xlCenter
bingkai_nl
ActiveCell.Offset(-1, 1).Select
Do While ActiveCell.Value <> ""
jml = Range(ActiveCell, ActiveCell.End(xlUp).Offset(2, 0)).Select
Selection.Name = "jml"
tot = Application.Sum(Range("jml"))
ActiveCell.End(xlDown).Offset(1, 0).Select
ActiveCell.Value = tot
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_nl
ActiveCell.Offset(-1, 1).Select
Loop
ActiveCell.Offset(2, -5).Select
ActiveCell.Formula = "=if(r[-1]c[2]>r[-1]c[1],""Laba Usaha"",""Rugi Usaha"")"
ActiveCell.HorizontalAlignment = xlCenter
bingkai_nl
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=r[-1]c[1]-r[-1]c"
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
ActiveCell.Font.Bold = True
Range(ActiveCell, ActiveCell.Offset(0, 2)).Select
bingkai_nl
ActiveCell.Offset(0, 3).Select
ActiveCell.Value = ActiveCell.Offset(0, -3)
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_nl
ActiveCell.Offset(1, -4).Select
ActiveCell.Value = "J U M L A H"
ActiveCell.HorizontalAlignment = xlCenter
bingkai_nl
82 HALAMAN
Membuat Aplikasi Akuntansi
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=R[-2]C+R[-1]C"
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_nl
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, 3)), xlFillCopy
End If
Else
MsgBox "Neraca Lajur sudah ditutup!", vbInformation
Range("a6").Select
ActiveSheet.Unprotect
End If
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
*Isi tombol Rugi Laba
Sub lab_rug()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Rugi Laba").Visible = True
Sheets("Menu").Visible = False
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
Sheets("Rugi Laba").Activate
Range("A1").Select
ActiveSheet.Unprotect
End Sub
83 HALAMAN
Membuat Aplikasi Akuntansi
*Isi tombol Perubahan Modal
Sub modal()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Perubahan Modal").Visible = True
Sheets("Menu").Visible = False
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Neraca").Visible = False
Sheets("Perubahan Modal").Activate
Range("A1").Select
End
End Sub
*Isi tombol Neraca
Sub neraca()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Neraca").Visible = True
Sheets("Menu").Visible = False
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Activate
84 HALAMAN
Membuat Aplikasi Akuntansi
ActiveSheet.Unprotect
Range("a9").Select
ActiveCell.End(xlDown).Select
If Range("a180").Value <> "J U M L A H" Then
Range("a180:b180").Select
Selection.MergeCells = True
Selection.Value = "J U M L A H"
ActiveCell.HorizontalAlignment = xlCenter
ActiveCell.Font.Bold = True
bingkai_nl
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=SUM(C10:C179)"
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
ActiveCell.Font.Bold = True
bingkai_nl
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, 1)), xlFillCopy
bingkai_nl
ActiveCell.Offset(0, -1).Select
ActiveCell.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select
Selection.EntireRow.Hidden = True
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = "Laba/Rugi Usaha"
Range(ActiveCell, ActiveCell.Offset(0, 1)).Select
Selection.MergeCells = True
ActiveCell.HorizontalAlignment = xlCenter
ActiveCell.Font.Bold = True
bingkai_nl
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=if(d180>c180,d180-c180,0)"
85 HALAMAN
Membuat Aplikasi Akuntansi
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_nl
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=if(c180>d180,c180-d180,0)"
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_nl
ActiveCell.Offset(1, -3).Select
ActiveCell.Value = "J U M L A H"
Range(ActiveCell, ActiveCell.Offset(0, 1)).Select
Selection.MergeCells = True
ActiveCell.HorizontalAlignment = xlCenter
bingkai_nl
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=SUM(C180:C181)"
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_nl
ActiveCell.Offset(0, 1).Select
ActiveCell.Formula = "=SUM(d180:d181)"
ActiveCell.NumberFormat = "_ ""Rp.""* #,##0.00_ "
bingkai_nl
Else
MsgBox "Neraca sudah ditutup", vbInformation
Range("a6").Select
ActiveSheet.Unprotect
End If
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
*Isi tombol Ke Menu
Sub menu()
ActiveWorkbook.Unprotect
Sheets("Menu").Visible = True
86 HALAMAN
Membuat Aplikasi Akuntansi
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWorkbook.Protect Structure:=True, Windows:=False
End Sub
Sedangkan untuk mengisi tombol-tombol perintah yang ada pada sheet Menu sebagai
berikut:
Klik kanan pada tombol yang akan diisi perintah, kemudian pilih Assign Macro, sehingga
akan ditampilkan kotak dialog Assign Macro seperti pada Gambar dibawah
87 HALAMAN
Membuat Aplikasi Akuntansi
Kemudian pilih salah satu nama prosedur yang akan disisipkan ke dalam tombol,
kemudian pilih ok.
Lakukan langkah yang sama untuk tombol yang lainnya dan sisipkan prosedur sesuai
dengan tombol masing-masing.
Selain mengisi kode program pad tombol-tombolyang terdapat dalam sheet Menu, pada
saat Workbook aktif atau dibuka juag diisi dengan kode program. Untuk mengisi kode
program pada workbook aktif dapat anda lakukan dengan langkah sebagai berikut:
Buka jendela Visual Basic Editor dengan cara tekan tombol Alt + F11 atau klik tombol
Visual Basic pada tab Develover group Code.
Kemudian pada bagian jendela Project Explorer klik dua kali pada This Workbook,
sehingga akan ditampilkan jendela Code untuk This Workbook, sehingga akan
ditampilkan jendela Code untuk This Workbook.
Pada bagian Object Pilih Workbook dan pada bagian Event (Procedure) pilih Open,
sehingga akan ditampilkan prosedur Workbook_Open.
Isi kode program didalam prosedur Workbook_Open sebagai berikut:
*Isi perintah pada saat Workbook dibuka
Private Sub Workbook_Open()
ActiveWorkbook.Unprotect
ActiveWindow.DisplayWorkbookTabs = True
Sheets("Menu").Visible = True
Sheets("COA").Visible = False
Sheets("Jurnal").Visible = False
Sheets("Buku Besar").Visible = False
Sheets("Jurnal Penyesuaian").Visible = False
Sheets("Neraca Lajur").Visible = False
Sheets("Rugi Laba").Visible = False
Sheets("Perubahan Modal").Visible = False
Sheets("Neraca").Visible = False
End Sub
88 HALAMAN
Membuat Aplikasi Akuntansi
MENYIMPAN
FILE APLIKASI
Setelah semua lembar kerja yang digunakan dalam aplikasi sudah selesai dibuat, maka
langkah selanjutnya adalah menyimpan lembar kerja tersebut. Karena file Aplikasi
Akuntansi juga berisi perintah-perintah macro, maka penyimpanannya tidak seperti
menyimpan file Microsoft Excel biasa.
Berikut langkah untuk menyimpan file Aplikasi Akuntansi Macro VBA.
Klik menu File dan pilih Save atau klik tombol Save pada Quick Acces Toolbar. Sehingga
akan ditampilkan backstage Save As, kemudian tekan tombol Browse untuk
menampilkan kotak dialog Save As, seperti pada gambar dibawah:
Tentukan lokasi folder untuk menyimpan file dan ketikkan nama file pada bagian File
Name, sebagai contoh beri nama PROGRAM AKUNTANSI.
Pada bagian Save as type pilih Excel Macro-Enabled Workbook, untuk menyimpan file
Microsoft Excel berikut Macro-nya.
Kemudian klik tombol Save untuk menyimpannya. Hasil dari file aplikasi ini berakhiran
xlsm (file Microsoft Excel Macro).
89 HALAMAN
DAFTAR PUSTAKA
Pura, Rahman, S.E. 2013, Pengantar Akuntansi (Pendekatan Siklus Akuntansi).
Jakarta: Penerbit Erlangga
Tofik, Moch., S.E. 2008. Memnbuat Aplikasi Akuntansi dengan Microsoft Excel
2007. Jakarta: Media Kita
Madcoms, 2017, Aplikasi Akuntansi Dengan Microsoft VBA (Macro).
Yogyakarta: Penerbi ANDI