0% found this document useful (0 votes)
21 views11 pages

Public Sub Bingkai

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views11 pages

Public Sub Bingkai

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Public Sub bingkai_ju()

With ActiveCell.Borders(xlEdgeLeft)

.LineStyle = xlcontinous

.ColorIndex = 1

.Weight = xlMedium

End With

With ActiveCell.Borders(xlEdgeRight)

.LineStyle = xlcontinous

.ColorIndex = 1

.Weight = xlMedium

End With

End Sub

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

Sub coa()

ActiveWorkbook.Unprotect

ActiveWindow.DisplayWorkbookTabs = True

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

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

frm_Info.Show

End Sub
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

Sub jup()

ActiveWorkbook.Unprotect

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

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

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

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

Range("a11").Select

ActiveCell.End(xlDown).Select

If ActiveCell.Value <> "J U M L A H" Then

tanya = MsgBox("Nearaca Lajur akan ditutupi?", vbYesNo, "Penutupan Neraca Lajur")

If tanya = vbyaes Then

ActiveCell.Offset(1, 0).Select

Range(ActiveCell, ActiveCell.Offset(0, 1)).Select

Selection.MergeCells = True

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 = aplication.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

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 ditutupi!", vbInformation

Range("a6").Select

ActiveSheet.Unprotect

End If

ActiveSheet.Protect DrawingObjects:=True, contents:=True, Scenarios:=True

End Sub

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

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

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

ActiveSheet.Unprotect

Range("a9").Select

ActiveCell.End(xlDown).Select

If Range("a180").Value <> "J U M L A H" Then


Range("a180:b180").Select

selecton.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 = "_""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)"

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

Sub Menu()

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:=False, Windows:=False

End Sub

You might also like