Menjalankan Time di ListVew Biar kaya Billing Warnet
data Timer interval kasih nilai 1000
Kode Program
Option Explicit Private arrJamClient() As String Private Sub Command1_Click(Index As Integer) arrJamClient(Index) = Format(Now, "hh:mm:ss") Timer1(Index).Enabled = True End Sub Private Sub Form_Load() Dim i As Long Timer1(0).Enabled = False Timer1(1).Enabled = False Timer1(2).Enabled = False Timer1(3).Enabled = False With ListView1 .View = lvwReport '.GridLines = True .ColumnHeaders.Add , , "No.", 500 .ColumnHeaders.Add , , "Klien", 3000 .ColumnHeaders.Add , , "Jam", 1000 ' contoh data 4 klien For i = 1 To 4 .ListItems.Add , , i .ListItems(i).SubItems(1) = "Client " & i If i > 1 Then Load Timer1(Timer1.UBound + 1) Next i ReDim arrJamClient(ListView1.ListItems.Count - 1) End With End Sub Private Sub Timer1_Timer(Index As Integer) arrJamClient(Index) = Format(TimeValue(arrJamClient(Index)) + TimeValue("00:00:01"), "hh:mm:ss") ListView1.ListItems(Index + 1).SubItems(2) = arrJamClient(Index) End Sub
Terimakasih semoga bermanfaat
0 comments:
Post a Comment