You are on page 1of 15

<!

-- This is example : XL-Dictator(B) With_Custom_Tab -->

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

<commands>
<command idMso="ApplicationOptionsDialog" enabled="false"/>
<command idMso="FileExit" enabled="false"/>
</commands>
<ribbon startFromScratch="true">
<officeMenu>
<button idMso="FileNew" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileSave" visible="false" />
</officeMenu>
<contextualTabs>
<tabSet idMso="TabSetSmartArtTools" visible="false" />
<tabSet idMso="TabSetChartTools" visible="false" />
<tabSet idMso="TabSetDrawingTools" visible="false" />
<tabSet idMso="TabSetPictureTools" visible="false" />
<tabSet idMso="TabSetPivotTableTools" visible="false" />
<tabSet idMso="TabSetHeaderAndFooterTools" visible="false" />
<tabSet idMso="TabSetTableToolsExcel" visible="false" />
<tabSet idMso="TabSetPivotChartTools" visible="false" />
<tabSet idMso="TabSetInkTools" visible="false" />
</contextualTabs>
<tabs>

<tab id="MyCustomTab" label="Input Data" >


<group id="customGroup1" label="Group 1">
<button idMso="MacroSecurity" label="Macro Security" showImage="true"
showLabel="true" size="large" visible="true"/>
<button id="customButton1" label="Data Dasar" size="large"
onAction="Macro1" imageMso="ContactCardViewMySite" />
<button id="customButton85" label="Interval" size="large"
onAction="Macro85" imageMso="CreateReportFromWizard" />
<button id="customButton84" label="KKM" size="large"
onAction="Macro84" imageMso="CreateQueryFromWizard" />
<button id="customButton2" label="Data Peserta Didik" size="large"
onAction="Macro2" imageMso="DistributionListAddNewMember" />
</group>
<group id="customGroup10" label="KD Pengetahuan">
<button id="KP1" label="Kelas 1" size="large" onAction="KP1"
imageMso="FunctionsMathTrigInsertGallery" />
<button id="KP2" label="Kelas 2" size="large" onAction="KP2"
imageMso="FunctionsMathTrigInsertGallery" />
<button id="KP3" label="Kelas 3" size="large" onAction="KP3"
imageMso="FunctionsMathTrigInsertGallery" />
<button id="KP4" label="Kelas 4" size="large" onAction="KP4"
imageMso="FunctionsMathTrigInsertGallery" />
<button id="KP5" label="Kelas 5" size="large" onAction="KP5"
imageMso="FunctionsMathTrigInsertGallery" />
<button id="KP6" label="Kelas 6" size="large" onAction="KP6"
imageMso="FunctionsMathTrigInsertGallery" />
</group>
<group id="customGroup11" label="KD Keterampilan">
<button id="KK1" label="Kelas 1" size="large" onAction="KK1"
imageMso="FunctionsRecentlyUsedtInsertGallery" />
<button id="KK2" label="Kelas 2" size="large" onAction="KK2"
imageMso="FunctionsRecentlyUsedtInsertGallery" />
<button id="KK3" label="Kelas 3" size="large" onAction="KK3"
imageMso="FunctionsRecentlyUsedtInsertGallery" />
<button id="KK4" label="Kelas 4" size="large" onAction="KK4"
imageMso="FunctionsRecentlyUsedtInsertGallery" />
<button id="KK5" label="Kelas 5" size="large" onAction="KK5"
imageMso="FunctionsRecentlyUsedtInsertGallery" />
<button id="KK6" label="Kelas 6" size="large" onAction="KK6"
imageMso="FunctionsRecentlyUsedtInsertGallery" />
<button idMso="FileSave" label="Save" size="large"
visible="true"/>

</group>
</tab>

<tab id="MyCustomTab2" label="Input Nilai" >


<group id="customGroup15" label="Nilai Sikap">
<button id="customButton80" label="Nilai Sikap Siswa" size="large"
onAction="Macro80" imageMso="AddOrRemoveAttendees" />
</group>
<group id="customGroup3" label="Nilai Pengetahuan">
<button id="customButton8" label="PAI" onAction="Macro8"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton9" label="PKn" onAction="Macro9"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton10" label="B.Indonesia"
onAction="Macro10" imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton11" label="Matematika" onAction="Macro11"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton12" label="IPA" onAction="Macro12"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton13" label="IPS" onAction="Macro13"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton14" label="SBdP" onAction="Macro14"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton41" label="PJOK" onAction="PengPJOK"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton15" label="Mulok 1" onAction="Macro15"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton16" label="Mulok 2" onAction="Macro16"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton67" label="Mulok 3" onAction="Macro67"
imageMso="FunctionsDateTimeInsertGallery" />
<button id="customButton68" label="Mulok 4" onAction="Macro68"
imageMso="FunctionsDateTimeInsertGallery" />
</group>
<group id="customGroup4" label="Nilai Keterampilan">
<button id="customButton17" label="PAI" onAction="Macro17"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton18" label="PKn" onAction="Macro18"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton19" label="B.Indonesia"
onAction="Macro19" imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton20" label="Matematika" onAction="Macro20"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton21" label="IPA" onAction="Macro21"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton22" label="IPS" onAction="Macro22"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton23" label="SBdP" onAction="Macro23"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton42" label="PJOK" onAction="KetPjok"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton24" label="Mulok 1" onAction="Macro24"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton25" label="Mulok 2" onAction="Macro25"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton65" label="Mulok 3" onAction="Macro65"
imageMso="FunctionsFinancialInsertGallery" />
<button id="customButton66" label="Mulok 4" onAction="Macro66"
imageMso="FunctionsFinancialInsertGallery" />
<button idMso="FileSave" label="Save" size="large"
visible="true"/>
</group>
</tab>

<tab id="Cetakdata" label="Hasil Nilai" >


<group id="customGroup21" label="Nilai PTS">
<button id="customButton94" label="Nilai Pengetahuan PTS"
onAction="Macro91" imageMso="AddResourcesFromActiveDirectory" />
<button id="customButton95" label="Nilai Keterampilan PTS"
onAction="Macro92" imageMso="AddResourcesFromActiveDirectory" />
<button id="customButton96" label="Nilai Rekapitulasi PTS"
onAction="Macro93" imageMso="AddResourcesFromActiveDirectory" />
</group>
<group id="customGroup7" label="Nilai">
<button id="customButton32" label="Pengetahuan"
onAction="Macro26" imageMso="ContentTypeEditColumn" />
<button id="customButton33" label="Keterampilan"
onAction="Macro27" imageMso="ContentTypeEditColumn" />
<button id="customButton36" label="Nilai Gabungan"
onAction="Macro28" imageMso="ContentTypeEditColumn" />
</group>
<group id="customGroup8" label="Taraf Serap">
<button id="customButton34" label="Taraf Serap Pengetahuan"
onAction="Macro29" imageMso="PropertySheet" />
<button id="customButton35" label="Taraf Serap Keterampilan"
onAction="Macro30" imageMso="PropertySheet" />
</group>
<group id="customGroup62" label="Piagam">
<button id="customButton60" label="Piagam Sikap"
onAction="Macro60" imageMso="CatalogMergeUseOutlookContacts" />
<button id="customButton61" label="Piagam Pengetahuan"
onAction="Macro61" imageMso="CatalogMergeUseOutlookContacts" />
<button id="customButton62" label="Piagam Keterampilan"
onAction="Macro81" imageMso="CatalogMergeUseOutlookContacts" />
</group>
<group id="customGroup5" label="Hasil">
<button id="customButton26" label="Buku Induk" size="large"
onAction="Macro33" imageMso="BuildingBlocksOrganizer" />
<button id="customButton27" label="Cover" size="large"
onAction="Macro34" imageMso="AccountMenu" />
<button id="customButton28" label="Grafik" size="large"
onAction="Macro35" imageMso="ChartSecondaryHorizontalAxisTitle" />
<separator id="MySeparator2" />
<button id="customButton51" label="Print" size="large"
onAction="Macro51" imageMso="PrintOptionsMenu" />
<button id="customButton52" label="Print" size="large"
onAction="Macro52" imageMso="FilePrintQuick" />
<button id="customButton53" label="Simpan PDF" size="large"
onAction="PDFActiveSheet" imageMso="FilePrepareMenu" />
</group>
</tab>

<tab id="Cetakrapor" label="Rapor" >


<group id="customGroup105" label="Rapor PTS">
<button id="customButton97" label="Rapor PTS" size="large"
onAction="Macro90" imageMso="AddResourcesFromActiveDirectory" />
</group>
<group id="customGroup16" label="Rapor Kelas Bawah">
<button id="customButton82" label="Rapor Semester 1" size="large"
onAction="Macro82" imageMso="AddResourcesFromActiveDirectory" />
<button id="customButton83" label="Rapor Semester 2" size="large"
onAction="Macro83" imageMso="AddResourcesFromActiveDirectory" />
<button id="customButton63" label="Format Pindah" size="large"
onAction="Pindah" imageMso="AddResourcesFromActiveDirectory" />
</group>
<group id="customGroup6" label="Rapor Kelas Atas">
<button id="customButton30" label="Rapor Semester 1" size="large"
onAction="Macro31" imageMso="AddResourcesFromActiveDirectory" />
<button id="customButton31" label="Rapor Semester 2" size="large"
onAction="Macro32" imageMso="AddResourcesFromActiveDirectory" />
<button id="customButton59" label="Format Pindah" size="large"
onAction="Pindah" imageMso="AddResourcesFromActiveDirectory" />
<button id="customButton73" label="Simpan PDF" size="large"
onAction="PDFActiveSheet" imageMso="FilePrepareMenu" />
</group>

</tab>

<tab id="ExportData" label="Export Data" >


<group id="Exportdata" label="Export Data">
<button id="customButton101" label="Nilai Pengetahuan PTS"
size="normal" onAction="Macro101" image="book_edit" />
<button id="customButton102" label="Nilai Keterampilan PTS"
size="normal" onAction="Macro102" image="book_edit" />
<button id="customButton103" label="Rekap Nilai PTS" size="normal"
onAction="Macro103" image="book_edit" />
<button id="customButton54" label="Buku Induk" size="normal"
onAction="Exp_INDUK" image="book_edit" />
<button id="customButton55" label="Rekap Pengetahuan" size="normal"
onAction="Exp_REKAP3" image="book_edit" />
<button id="customButton56" label="Rekap Keterampilan" size="normal"
onAction="Exp_REKAP4" image="book_edit" />
<button id="customButton57" label="Rekap Gabungan" size="normal"
onAction="Exp_REKAP34" image="book_edit" />
<button id="customButton58" label="Rekap Nilai Sikap" size="normal"
onAction="Exp_SIKAP" image="book_edit" />
</group>
<group id="TOOLS" label="TOOLS">

<button idMso="Cut" label="Cut" visible="true"/>

<button idMso="Copy" label="Copy" visible="true"/>

<button idMso="Paste" label="Paste" visible="true"/>

<button idMso="PictureInsertFromFile" label="Picture" visible="true"/>

<checkBox enabled="true" idMso="ViewHeadings" label="Headings"


visible="true"/>

</group >
</tab>
</tabs>
</ribbon>
</customUI>

Sub KP1(control As IRibbonControl)


Sheets("KP1").Select
End Sub
Sub KK1(control As IRibbonControl)
Sheets("KK1").Select
End Sub
Sub KP2(control As IRibbonControl)
Sheets("KP2").Select
End Sub
Sub KK2(control As IRibbonControl)
Sheets("KK2").Select
End Sub
Sub KP3(control As IRibbonControl)
Sheets("KP3").Select
End Sub
Sub KK3(control As IRibbonControl)
Sheets("KK3").Select
End Sub
Sub KP4(control As IRibbonControl)
Sheets("KP4").Select
End Sub
Sub KK4(control As IRibbonControl)
Sheets("KK4").Select
End Sub
Sub KP5(control As IRibbonControl)
Sheets("KP5").Select
End Sub
Sub KK5(control As IRibbonControl)
Sheets("KK5").Select
End Sub
Sub KP6(control As IRibbonControl)
Sheets("KP6").Select
End Sub
Sub KK6(control As IRibbonControl)
Sheets("KK6").Select
End Sub
Sub Pindah(control As IRibbonControl)
Sheets("Pindah").Select
End Sub
Sub in1(control As IRibbonControl)
Sheets("in1").Select
End Sub
Sub in2(control As IRibbonControl)
Sheets("in2").Select
End Sub

Sub Macro1(control As IRibbonControl)


Sheets("Dasar").Select
End Sub
Sub Macro2(control As IRibbonControl)
Sheets("PD").Select
End Sub
Sub Macro8(control As IRibbonControl)
Sheets("3-1").Select
End Sub
Sub Macro9(control As IRibbonControl)
Sheets("3-2").Select
End Sub
Sub Macro10(control As IRibbonControl)
Sheets("3-3").Select
End Sub
Sub Macro11(control As IRibbonControl)
Sheets("3-4").Select
End Sub
Sub Macro12(control As IRibbonControl)
Sheets("3-5").Select
End Sub
Sub Macro13(control As IRibbonControl)
Sheets("3-6").Select
End Sub
Sub Macro14(control As IRibbonControl)
Sheets("3-7").Select
End Sub
Sub Macro15(control As IRibbonControl)
Sheets("3-9").Select
End Sub
Sub Macro16(control As IRibbonControl)
Sheets("3-10").Select
End Sub
Sub PengPJOK(control As IRibbonControl)
Sheets("3-8").Select
End Sub
Sub Macro67(control As IRibbonControl)
Sheets("3-11").Select
End Sub
Sub Macro68(control As IRibbonControl)
Sheets("3-12").Select
End Sub
Sub Macro80(control As IRibbonControl)
Sheets("1&2").Select
End Sub

Sub Macro17(control As IRibbonControl)


Sheets("4-1").Select
End Sub
Sub Macro18(control As IRibbonControl)
Sheets("4-2").Select
End Sub
Sub Macro19(control As IRibbonControl)
Sheets("4-3").Select
End Sub
Sub Macro20(control As IRibbonControl)
Sheets("4-4").Select
End Sub
Sub Macro21(control As IRibbonControl)
Sheets("4-5").Select
End Sub
Sub Macro22(control As IRibbonControl)
Sheets("4-6").Select
End Sub
Sub Macro23(control As IRibbonControl)
Sheets("4-7").Select
End Sub
Sub KetPJOK(control As IRibbonControl)
Sheets("4-8").Select
End Sub
Sub Macro24(control As IRibbonControl)
Sheets("4-9").Select
End Sub
Sub Macro25(control As IRibbonControl)
Sheets("4-10").Select
End Sub
Sub Macro65(control As IRibbonControl)
Sheets("4-11").Select
End Sub
Sub Macro66(control As IRibbonControl)
Sheets("4-12").Select
End Sub
Sub Macro26(control As IRibbonControl)
Sheets("rekap3").Select
End Sub
Sub Macro27(control As IRibbonControl)
Sheets("rekap4").Select
End Sub
Sub Macro28(control As IRibbonControl)
Sheets("rekap34").Select
End Sub
Sub Macro29(control As IRibbonControl)
Sheets("TF.P").Select
End Sub
Sub Macro30(control As IRibbonControl)
Sheets("TF.K").Select
End Sub
Sub Macro31(control As IRibbonControl)
Sheets("Raport1").Select
End Sub
Sub Macro32(control As IRibbonControl)
Sheets("Raport2").Select
End Sub
Sub Macro33(control As IRibbonControl)
Sheets("Induk").Select
End Sub
Sub Macro34(control As IRibbonControl)
Sheets("Cover").Select
End Sub
Sub Macro35(control As IRibbonControl)
Sheets("GRAFIK").Select
End Sub
Sub Macro60(control As IRibbonControl)
Sheets("P1").Select
End Sub
Sub Macro61(control As IRibbonControl)
Sheets("P2").Select
End Sub
Sub Macro81(control As IRibbonControl)
Sheets("P3").Select
End Sub
Sub Macro82(control As IRibbonControl)
Sheets("Raport1 (2)").Select
End Sub
Sub Macro83(control As IRibbonControl)
Sheets("Raport2 (2)").Select
End Sub
Sub Macro84(control As IRibbonControl)
Sheets("KKM-2").Select
End Sub
Sub Macro85(control As IRibbonControl)
Sheets("Interval").Select
End Sub
Sub Macro90(control As IRibbonControl)
Sheets("RAPORPTS").Select
End Sub
Sub Macro91(control As IRibbonControl)
Sheets("REKAP3PTS").Select
End Sub
Sub Macro92(control As IRibbonControl)
Sheets("REKAP4PTS").Select
End Sub
Sub Macro93(control As IRibbonControl)
Sheets("REKAP34PTS").Select
End Sub
Sub Macro101(control As IRibbonControl)
On Error Resume Next
Dim ws As Worksheet, wb As Workbook
Dim FPath As String
Dim kls As String
Worksheets("Rekap3PTS").Activate
Set ws = ActiveSheet
Set wb = Workbooks.Add(xlWBATWorksheet)
FPath = ThisWorkbook.Path
ws.Range("G1:W221").Copyx
ws.Range("G1:W221").Copy
wb.Sheets(1).Range("A1").Paste
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteColumnWidths
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteValues
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteFormats
wb.Sheets(1).Name = "Nilai Rekap PTS"
On Error Resume Next
Application.CutCopyMode = False
Set ws = Worksheets("Rekap3PTS")
ActiveWorkbook.SaveAs Filename:=FPath & "\File Export\" & "Rekap3PTS" &
kls & " - " & Format(Date, "ddmmyy") & Format(Time, "hmm") & ".xlsx"
MsgBox "Export Data Sudah Selesai", vbInformation, "sistem aplikasi"
ActiveWorkbook.Close savechanges:=True
On Error GoTo 0
End Sub
Sub Macro102(control As IRibbonControl)
On Error Resume Next
Dim ws As Worksheet, wb As Workbook
Dim FPath As String
Dim kls As String
Worksheets("Rekap4PTS").Activate
Set ws = ActiveSheet
Set wb = Workbooks.Add(xlWBATWorksheet)
FPath = ThisWorkbook.Path
ws.Range("G1:W221").Copyx
ws.Range("G1:W221").Copy
wb.Sheets(1).Range("A1").Paste
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteColumnWidths
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteValues
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteFormats
wb.Sheets(1).Name = "Nilai Rekap PTS"
On Error Resume Next
Application.CutCopyMode = False
Set ws = Worksheets("Rekap4PTS")
ActiveWorkbook.SaveAs Filename:=FPath & "\File Export\" & "Rekap4PTS" &
kls & " - " & Format(Date, "ddmmyy") & Format(Time, "hmm") & ".xlsx"
MsgBox "Export Data Sudah Selesai", vbInformation, "sistem aplikasi"
ActiveWorkbook.Close savechanges:=True
On Error GoTo 0
End Sub
Sub Macro103(control As IRibbonControl)
On Error Resume Next
Dim ws As Worksheet, wb As Workbook
Dim FPath As String
Dim kls As String
Worksheets("Rekap34PTS").Activate
Set ws = ActiveSheet
Set wb = Workbooks.Add(xlWBATWorksheet)
FPath = ThisWorkbook.Path
ws.Range("G1:W221").Copyx
ws.Range("G1:W221").Copy
wb.Sheets(1).Range("A1").Paste
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteColumnWidths
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteValues
wb.Sheets(1).Range("A1").PasteSpecial Paste:=xlPasteFormats
wb.Sheets(1).Name = "Nilai Rekap PTS"
On Error Resume Next
Application.CutCopyMode = False
Set ws = Worksheets("Rekap34PTS")
ActiveWorkbook.SaveAs Filename:=FPath & "\File Export\" & "Rekap34PTS" &
kls & " - " & Format(Date, "ddmmyy") & Format(Time, "hmm") & ".xlsx"
MsgBox "Export Data Sudah Selesai", vbInformation, "sistem aplikasi"
ActiveWorkbook.Close savechanges:=True
On Error GoTo 0
End Sub

Sub Cetak()
ActiveWindow.SelectedSheets.PrintOut
End Sub
Sub Mulok4()
MsgBox "Sementara ini aplikasi baru di desain untuk 3 Mulok. Jika ingin di
ubah menjadi 4 Mulok, silahkan hubungi penyusun 08777-3949-015", vbOKOnly,
"Fitur Premium"
End Sub
Sub KD_Button1_Click()
FormKD.Show
End Sub
Sub Lihat()
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Sub ambilGambar1()
Dim pat As String
pat = ThisWorkbook.Path & "\"
ActiveSheet.Shapes.Range(Array("Rectangle 7")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.UserPicture _
pat & "TTDKEP.png"
End With
End Sub
Sub HapusG1()
ActiveSheet.Shapes.Range(Array("Rectangle 7")).Select
Selection.ShapeRange.Fill.Visible = msoFalse
End Sub
Sub ambilGambar2()
Dim pat As String
pat = ThisWorkbook.Path & "\"
ActiveSheet.Shapes.Range(Array("Rectangle 8")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.UserPicture _
pat & "TTDGURU.png"
End With
End Sub
Sub HapusG2()
ActiveSheet.Shapes.Range(Array("Rectangle 8")).Select
Selection.ShapeRange.Fill.Visible = msoFalse
End Sub
Sub ambilGambar3()
Dim pat As String
pat = ThisWorkbook.Path & "\"
ActiveSheet.Shapes.Range(Array("Rectangle 9")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.UserPicture _
pat & "STEMPEL.png"
End With
End Sub
Sub HapusG3()
ActiveSheet.Shapes.Range(Array("Rectangle 9")).Select
Selection.ShapeRange.Fill.Visible = msoFalse
End Sub

Sub Simpan()
ActiveWorkbook.Save
End Sub
Sub CetakSemua()
MsgBox "Maaf, fitur ini belum diaktifkan"
End Sub
Sub Urut_Rank31()
ActiveSheet.Unprotect ("1")
Range("DB_Rekap").Sort Key1:=Range("W7"), Order1:=xlAscending, Header:=xlNo
ActiveSheet.Protect ("1")
End Sub
Sub Urut_Nomor31()
ActiveSheet.Unprotect ("1")
Range("DB_Rekap").Sort Key1:=Range("G7"), Order1:=xlAscending, Header:=xlNo
ActiveSheet.Protect ("1")
End Sub
Sub Urut_Rank41()
ActiveSheet.Unprotect ("1")
Range("DB_Rekap4").Sort Key1:=Range("W7"), Order1:=xlAscending, Header:=xlNo
ActiveSheet.Protect ("1")
End Sub
Sub Urut_Nomor41()
ActiveSheet.Unprotect ("1")
Range("DB_Rekap4").Sort Key1:=Range("G7"), Order1:=xlAscending, Header:=xlNo
ActiveSheet.Protect ("1")
End Sub
Sub Urut_Rank34()
ActiveSheet.Unprotect ("1")
Range("Db_Rekaps").Sort Key1:=Range("AI7"), Order1:=xlAscending, Header:=xlNo
ActiveSheet.Protect ("1")
End Sub
Sub Urut_Nomor34()
ActiveSheet.Unprotect ("1")
Range("Db_Rekaps").Sort Key1:=Range("G7"), Order1:=xlAscending, Header:=xlNo
ActiveSheet.Protect ("1")
End Sub

Sub CetakBanyakRaport()
Kali = Range("AR2").Value
Dim Mulai As Integer
Dim Sampai As Integer
Mulai = Range("AR2")
Sampai = Range("AR")
Range("AR2") = Mulai
For i = Mulai To Sampai
ActiveSheet.PrintOut Copies:=Kali
If Range("AR2") = Sampai Then Exit Sub
Range("AR2") = Range("AR2") + 1
Next
End Sub
Sub Cmd_Buka_Click()
ActiveSheet.Unprotect ("1")
ActiveSheet.Range("$H$8:$H$207").AutoFilter Field:=1
Range("AG5").Select
ActiveSheet.Protect ("1")
End Sub
Sub Cmd_tutup_Click()
ActiveSheet.Unprotect ("1")
ActiveSheet.Range("$H$8:$H$207").AutoFilter Field:=1, Criteria1:="<>"
ActiveSheet.Protect ("1")
End Sub
Sub ProtectAll()
Dim wSheet As Worksheet
Dim Pwd As String
Pwd = InputBox("Silahkan masukkan password untuk protect all worksheets",
"secret")
For Each wSheet In Worksheets
wSheet.Protect Password:=Pwd
Next wSheet
End Sub
'Macro Membuka Memproteks
Sub UnProtectAll()
Dim wSheet As Worksheet
Dim Pwd As String
Pwd = InputBox("1", "secret")
For Each wSheet In Worksheets
wSheet.Unprotect Password:=Pwd
Next wSheet
End Sub
Sub Cmdbuka_Click()
ActiveSheet.Unprotect ("1")
ActiveSheet.Range("$G$10:$G$209").AutoFilter Field:=1
Range("G9").Select
ActiveSheet.Protect ("1")
End Sub
Sub Cmdtutup_Click()
ActiveSheet.Unprotect ("1")
ActiveSheet.Range("$G$10:$G$209").AutoFilter Field:=1, Criteria1:="<>"
ActiveSheet.Protect ("1")
End Sub
'Menyembunyikan Gridlines
Sub Hide_Gridlines()
Dim ws As Worksheet
'hide gridlines in a workbook
For Each ws In Worksheets
ws.Activate
ActiveWindow.DisplayGridlines = False
Next ws
End Sub
Sub Show_Gridlines()
Dim ws As Worksheet
'show gridlines in a workbook
For Each ws In Worksheets
ws.Activate
ActiveWindow.DisplayGridlines = True
Next ws
End Sub
Sub Show_the_formula_bar()
'show the formula bar
Application.DisplayFormulaBar = True
End Sub
Sub Hide_the_formula_bar()
'hide the formula bar
Application.DisplayFormulaBar = False
End Sub
Sub Hide_Row_Column_Headings()
Dim ws As Worksheet
'hide row and column headings in a workbook
For Each ws In Worksheets
ws.Activate
ActiveWindow.DisplayHeadings = False
Next ws
End Sub
Sub Hide_sheets_tab_section()
'hide sheet tabs
ActiveWindow.DisplayWorkbookTabs = False
End Sub
Sub show_sheets_tab_section()
'hide sheet tabs
ActiveWindow.DisplayWorkbookTabs = True
End Sub

Sub Urut_Rank3()
Range("W7").Select
ActiveWorkbook.Worksheets("Rekap3").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Rekap3").AutoFilter.Sort.SortFields.Add
Key:=Range( _
"W6:W206"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Rekap3").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub Urut_Nomor3()
ActiveWorkbook.Worksheets("Rekap3").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Rekap3").AutoFilter.Sort.SortFields.Add
Key:=Range( _
"G6:G206"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Rekap3").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub

Sub Urut_Rank4()
Range("W7").Select
ActiveWorkbook.Worksheets("Rekap4").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Rekap4").AutoFilter.Sort.SortFields.Add
Key:=Range( _
"W6:W206"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Rekap4").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub Urut_Nomor4()
ActiveWorkbook.Worksheets("Rekap4").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Rekap4").AutoFilter.Sort.SortFields.Add
Key:=Range( _
"G6:G206"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Rekap4").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub Urut_RankGabung()
Range("AI7").Select
ActiveWorkbook.Worksheets("Rekap3&4").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Rekap3&4").AutoFilter.Sort.SortFields.Add
Key:=Range( _
"AI6:AI206"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=
_
xlSortNormal
With ActiveWorkbook.Worksheets("Rekap3&4").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub Urut_NomorGabung()
ActiveWorkbook.Worksheets("Rekap3&4").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Rekap3&4").AutoFilter.Sort.SortFields.Add
Key:=Range( _
"G6:G206"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Rekap3&4").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub

You might also like