Private Sub CommandButton2_Click()
Dim ir&, k&, arr, dic, a%, brr(), m%, n%
Dim i_id%, i_name%, i_date%, i_time1%, i_time2%, i_time3%, i_time4%
Dim dat1 As Date, dat2 As Date, il%, tim As Date, kao$
i_id = InStr("ABCDEFGH", ComboBox2.Value) i_date = InStr("ABCDEFGH", ComboBox3.Value)
i_time1 = InStr("ABCDEFGH", ComboBox4.Value)
i_time2 = InStr("ABCDEFGH", ComboBox5.Value)
i_time3 = InStr("ABCDEFGH", ComboBox6.Value)
i_time4 = InStr("ABCDEFGH", ComboBox7.Value)
For k = 1 To UBound(arr, 1) m = dic.Item(arr(k, i_id)) + 1
n = (arr(k, i_date) - dat1) * 2
tim = Format(arr(k, i_time1), "hh:mm") & Format(arr(k, i_time2), "hh:mm") & Format(arr(k, i_time3), "hh:mm") & Format(arr(k, i_time4), "hh:mm")
老师请教个问题,上面代码到tim=这里出错,我需要怎样才能把4列的数据都赋值给tim呢?
|