Pastekan Kode Pada
CommandButton1
Private Sub CommandButton1_Click()
Sheet1.Activate
Cells(6,
4).Value = ComboBox1.Value
Cells(7,
4).Value = TextBox1.Value
Cells(8,
4).Value = TextBox2.Value
Cells(9,
4).Value = TextBox3.Value
Cells(10,
4).Value = TextBox4.Value
Cells(11,
4).Value = TextBox5.Value
Cells(12,
4).Value = TextBox6.Value
Cells(13,
4).Value = TextBox7.Value
Cells(14,
4).Value = TextBox8.Value
Cells(14,
4).Value = TextBox8.Value
End
Sub
‘Menampilkan data pilihan ComboBox1
Private Sub ComboBox1_Change()
Cari
= ComboBox1.Value
With
Worksheets("Sheet2").Range("B6:B50")
Set
c = .Find(Cari, LookIn:=xlValues)
If
Not c Is Nothing Then
Baris
= c.row
'Menampilkan
data "ISIAN "
TextBox1.Value
= Worksheets("Sheet2").Cells(Baris, 3).Value
TextBox2.Value
= Worksheets("Sheet2").Cells(Baris, 4).Value
TextBox3.Value
= Worksheets("Sheet2").Cells(Baris, 5).Value
TextBox4.Value
= Worksheets("Sheet2").Cells(Baris, 6).Value
TextBox5.Value
= Worksheets("Sheet2").Cells(Baris, 7).Value
TextBox6.Value
= Worksheets("Sheet2").Cells(Baris, 8).Value
TextBox7.Value
= Worksheets("Sheet2").Cells(Baris, 9).Value
TextBox8.Value
= Worksheets("Sheet2").Cells(Baris, 10).Value
Else
MsgBox
"Nama Belum terdaftar"
End
If
End
With
End
Sub
Rumus yang
digunakan
=MID($D$6,COLUMNS($D:D),1)
=MID($D$6,COLUMNS($D:f),1)
=MID($D$6,COLUMNS($D:g),1)
=MID($D$6,COLUMNS($D:g),1)
UNDUH SAMPEL FILE XLSM >>> DISINI
No comments:
Post a Comment