这是程序局部:
For k = 2 To 10000
If .Cells(k, 1).Value = "" Then Exit For
hr = Hour(.Cells(k, 1).Value)
mt = Minute(.Cells(k, 1).Value)
mo = .Cells(k, 9).Value
w = Val(.Cells(k, 10).Value) + 2
str1 = Cells(j, w).Value
If Len(str1) > 16 Then
Cells(j, w).Value = Cells(j, w).Value + "HH"
If Len(str1) > 16 And CStr(hr) >= 23 Then w = w + 1
Cells(j, w).Value = Cells(j, w).Value + CStr(hr) + ":" + Right("0" + CStr(mt), 2) + " "
Next k
当我没有粗体 If Len(str1) > 16 Then
Cells(j, w).Value = Cells(j, w).Value + "HH"
程序正常,一旦加进去就说NEXT没有FOR,下面同样的IF就没有问题,为什么这个就不行呢.
这个是别人以前写好的宏,似乎只要我修改都会报错,跪求高手指点!!!!!!!!!!!!!!!
[此贴子已经被作者于2007-3-20 23:57:10编辑过]
|