Pastekan pada
CommandButton1
Private Sub
CommandButton1_Click()
Dim irow As Long
irow =
Worksheets("sheet1").Cells(Rows.Count, 2).End(xlUp).Offset(1, 1).Row
Worksheets("sheet1").Cells(irow,
2).Value = TextBox1.Value
Worksheets("sheet1").Cells(irow,
3).Value = TextBox2.Value
Sheets("sheet1").Range("a1")
= Application.CountA(Range("b5:b20"))
No = 0
For NOMOR = 1 To
Range("a1")
No = No + 1
Cells(No + 4, 1).Value = No
Next NOMOR
End Sub
Pastekan pada Userform
Private Sub
UserForm_Initialize()
ListBox1.ColumnCount
= 3
ListBox1.ColumnWidths
= 50 & ";" & 100 & ";" & 150
ListBox1.RowSource = "data"
End Sub
No comments:
Post a Comment