为什么运行完这个代码后不能直接运行下一个代码 Private Sub CommandButton45_Click() Application.ScreenUpdating = False y= [ae1] & "@" & [ae2] & "@" & [ae3] &"@" & [ae4] ar = Range("r8:r9000").Value For h = 1 To UBound(ar) If ar(h, 1) & "@" & ar(h + 1, 1) & "@"& ar(h + 2, 1) & "@" & ar(h + 3, 1) = y Then Cells(h + 7, 18).Resize(4, 1).Interior.ColorIndex = 6 End If If h = 8990 Then: End Next h Application.ScreenUpdating= True Dim arr ir = 28 Application.ScreenUpdating= False For i = 18 To 24 ' Z = 1 For j = Cells(Rows.Count, i).End(3).Row To4 Step -1 If Cells(j, i).Interior.Color = vbYellowAnd Cells(j - 3, i).Interior.Color = vbYellow Then ' If Z > 1 Then If j >= 11 Then Cells(j - 11,i).Resize(21).Copy Cells(8, r) r = r + 1 End If ' End If Z = Z + 1 End If Next Next i Application.ScreenUpdating= True End Sub
|