![]() |
#2
lanyingjie2014-03-08 11:50
|

Private Sub recTimer_Timer()
On Error GoTo myErr
Dim temp As Double
temp = 0.02
If (intReceiveLen > 0 And recLen = intReceiveLen) Then
Dim revalue As Integer
revalue = treateRecdata
If (revalue = 1) Then
With grdRunData
For ii = 0 To 8
.ColAlignment(ii) = 4
Next ii
lblRecDT.Caption = DTPicker1.Value
For i = 0 To UBound(R_Data)
If "" <> R_Data(i) Then
.Rows = i + 2
.TextMatrix(i + 1, 5) = R_Data(i)
.TextMatrix(i + 1, 4) = DateAdd("s", 900, DTPicker1.Value) 这是第一行第四列的时间
.TextMatrix(i + 1, 3) = DTPicker1 这是第一行第三列的时间
.TextMatrix(i + 1, 0) = i + 1
If (i + 1) Mod 2 = 0 Then
.TextMatrix(i + 1, 1) = Format(temp, "0.00")
If (i + 1) Mod 6 = 0 Then
temp = temp + 0.02
End If
End If
End If
Next i
请问如何依次将每行的时间加5秒 ,,,万分感谢
On Error GoTo myErr
Dim temp As Double
temp = 0.02
If (intReceiveLen > 0 And recLen = intReceiveLen) Then
Dim revalue As Integer
revalue = treateRecdata
If (revalue = 1) Then
With grdRunData
For ii = 0 To 8
.ColAlignment(ii) = 4
Next ii
lblRecDT.Caption = DTPicker1.Value
For i = 0 To UBound(R_Data)
If "" <> R_Data(i) Then
.Rows = i + 2
.TextMatrix(i + 1, 5) = R_Data(i)
.TextMatrix(i + 1, 4) = DateAdd("s", 900, DTPicker1.Value) 这是第一行第四列的时间
.TextMatrix(i + 1, 3) = DTPicker1 这是第一行第三列的时间
.TextMatrix(i + 1, 0) = i + 1
If (i + 1) Mod 2 = 0 Then
.TextMatrix(i + 1, 1) = Format(temp, "0.00")
If (i + 1) Mod 6 = 0 Then
temp = temp + 0.02
End If
End If
End If
Next i
请问如何依次将每行的时间加5秒 ,,,万分感谢