0% found this document useful (0 votes)
97 views2 pages

Coding Module Overview

This document contains 3 coding modules: 1. The first module contains macros for scrolling and protecting a sheet, and for automatically numbering students and teachers. 2. The second module contains macros for opening different forms and for saving and exiting the workbook. 3. The third module contains macros for sorting student and teacher data in ascending order.

Uploaded by

D'setiawan
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)
97 views2 pages

Coding Module Overview

This document contains 3 coding modules: 1. The first module contains macros for scrolling and protecting a sheet, and for automatically numbering students and teachers. 2. The second module contains macros for opening different forms and for saving and exiting the workbook. 3. The third module contains macros for sorting student and teacher data in ascending order.

Uploaded by

D'setiawan
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

CODING MODUL

1. MODUL SCROOL DAN PROTECT SHEET

Private Sub Workbook_Open()


Sheets("MENU").ScrollArea = "A1:U33"
End Sub
Sub ProtectSheet()
[Link] DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub

Sub UnprotectSheet()
[Link]
End Sub

Sub AutoNumberSiswa()
[Link] = False
[Link]
Dim i As Long
i = [Link]([Link]("B5:B100000")) + 4
[Link]("A5").Value = 1
[Link]("A6").Value = 2
[Link]("A5:A6").Select
[Link] Destination:=Range("A5:A" & i), Type:=xlFillDefault
[Link]("A4").Select
[Link]
End Sub

Sub AutoNumberGuru()
[Link] = False
[Link]
Dim i As Long
i = [Link]([Link]("B5:B10000")) + 4
[Link]("A5").Value = 1
[Link]("A6").Value = 2
[Link]("A5:A6").Select
[Link] Destination:=[Link]("A5:A" & i), Type:=xlFillDefault
[Link]("A4").Select
[Link]
End Sub
2. MODUL TOMBOL NAVIGASI
Sub BukaFormGuru()
[Link]
End Sub
Sub BukaFormSiswa()
[Link]
End Sub

Sub BukaFormCari()
[Link]
End Sub
Sub Simpan()
[Link]
End Sub
Sub Keluar()
Select Case MsgBox("Anda akan keluar dari Aplikasi" _
& vbCrLf & "Apakah anda yakin?" _
, vbYesNo Or vbQuestion Or vbDefaultButton1, "Keluar")
Case vbNo
Exit Sub
Case vbYes
End Select
[Link]
[Link]
End Sub

3. MODUL URUT
Sub UrutGuru()
[Link] = False
[Link]
[Link]("A4:J20000").Sort KEY1:=Range("B4"), Order1:=xlAscending, Header:=xlYes
[Link]
End Sub
Sub UrutSiswa()
[Link] = False
[Link]
[Link]("A4:L20000").Sort KEY1:=Range("C4"), Order1:=xlAscending, Header:=xlYes
[Link]
End Sub

You might also like