KODE PADA USERFORM PENCARIAN
Private
Sub CommandButton1_Click()
Worksheets("ANAK").Range("A45:W60").Value = ""
Call
Modul_____Data___kk
End
Sub
Private Sub ListBox1_Click()
TextBox14
= ListBox1.List(ListBox1.ListIndex, 1)
TextBox15.Text
= ListBox1.List(ListBox1.ListIndex, 4)
TextBox16.Text
= ListBox1.List(ListBox1.ListIndex, 3)
Sheets("DATA").Cells(1,
7).Value = TextBox14.Value
End
Sub
Private
Sub OptionButton2_Click()
Sheets("PENCARIAN").Range("B7").Value
= 3
End
Sub
Private
Sub OptionButton3_Click()
Sheets("PENCARIAN").Range("B7").Value
= 4
End
Sub
Private
Sub TextBox14_Change()
Sheets("DATA").Cells(1,
7).Value = TextBox14.Value
End
Sub
Private
Sub TextBox18_Change()
Sheets("PENCARIAN").Range("E8").Value
= TextBox18.Value
End
Sub
Private
Sub UserForm_Initialize()
ListBox1.ColumnCount
= 6
ListBox1.ColumnHeads
= True
ListBox1.ColumnWidths
= 0 & ";" & 0 & ";" & 120 &
";" & 100 & ";" & 0 & ";" & 0
ListBox1.RowSource = "CARI"
OptionButton2
= True
End
Sub
KODE PADA MODUL
Sub Modul_____Data___kk()
Worksheets("DATA").Select
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
Set Source =
ActiveWorkbook.Worksheets("DATA")
Set Target =
ActiveWorkbook.Worksheets("ANAK")
j = 45
' Start copying to row 1 in target sheet
For Each c In
Source.Range("C8:C6000")
If c =
Worksheets("DATA").Range("G1") Then
Source.Rows(c.row).Copy
Target.Rows(j)
j = j + 1
End If
Next c
Application.CutCopyMode = False
Worksheets("ANAK").Select
End
Sub
UNDUH FILE >>> KK SEMENTARA
No comments:
Post a Comment