Input multy sheet
Kode input pastekan kode pada CommandButton1
Private Sub CommandButton1_Click()
For k = 0 To ListBox1.ListCount 1
bila kotak ceklis pilih salah satu atau semuanya
If ListBox1.Selected(k) Then
Sheets(ListBox1.List(k)).Select
Sheets(ListBox1.List(k)).Cells.SpecialCells(xlLastCell).Select
Range(Selection, Cells(1, 1)).Select
End If
Next
Dim iRow As Long Menempatkan data input disetiap sheet pilihan
iRow = WorksheetFunction.CountA(Range("b:b")) + 5
Cells(iRow, 2).Value = TextBox1.Value
Cells(iRow, 3).Value = TextBox2.Value
Cells(iRow, 4).Value = TextBox3.Value
Cells(iRow, 5).Value = TextBox4.Value
Cells(iRow, 6).Value = TextBox5.Value
Menempatkan fungsi counta disetiap sheet pilihan untuk member nomor urut disetiap input
Range("A1") = Application.CountA(Range("c6:c100"))
No = 0
For NOMOR = 1 To Range("A1")
No = No + 1
Cells(No + 5, 1).Value = No
Next NOMOR
End Sub
input pilih multy sheets
No comments:
Post a Comment