7,763
社区成员
发帖
与我相关
我的任务
分享
If xlSheet.Range(Lines1 & Rows1).vlaue = "●" And xlSheet.Range(Lines2 & Rows1).vlaue = "●" And xlSheet.Range(Lines3 & Rows1).vlaue = "●" And xlSheet.Range(Lines4 & Rows1).vlaue = "●" And xlSheet.Range(Lines5 & Rows1).vlaue = "●" Then
xlSheet.Cells(Lines1, Rows1).Interior.ColorIndex = 6
End If
If xlSheet.cells(Lines1 & Rows1) = "●" And xlSheet.cells(Lines2 & Rows1) = "●" And xlSheet.cells(Lines3 & Rows1) = "●" And xlSheet.cells(Lines4 & Rows1) = "●" And xlSheet.cells(Lines5 & Rows1) = "●" Then
xlSheet.Cells(Lines1, Rows1).Interior.ColorIndex = 6
End If
For R = 2 To 34
Do
L = 3
If xlSheet.Cells(L, R) = "●" And xlSheet.Cells(L + 1, R) = "●" Then
xlSheet.Cells(L, R).Interior.ColorIndex = 6
End If
L = L + 1
Loop Until xlSheet.Range("A" & L).Value = ""
Next R
Dim xlApp As New Excel.Application
Dim xlBook As New Excel.Workbook
Dim xlSheet As New Excel.Worksheet
Dim N As Long
Dim Rows1 As Long
Dim Rows2 As Long
Dim Rows3 As Long
Dim Rows4 As Long
Dim Rows5 As Long
Dim Rows6 As Long
Dim Rows7 As Long
Dim Lines1 As Long
Dim Lines2 As Long
Dim Lines3 As Long
Dim Lines4 As Long
Dim Lines5 As Long
If Text1.Text = "" Then
MsgBox ("请选择文件位置!")
Exit Sub
Else
Set xlBook = xlApp.Workbooks.Open(Text1.Text)
Set xlSheet = xlBook.Worksheets(2)
End If
Lines1 = 1
Lines2 = 2
Lines3 = 3
Lines4 = 4
lings5 = 5
Rows1 = 1
Rows2 = 2
Rows3 = 3
Rows4 = 4
Rows5 = 5
Rows6 = 6
Rows7 = 7
Do
Lines1 = Lines1 + 1
Lines2 = Lines2 + 1
Lines3 = Lines3 + 1
Lines4 = Lines4 + 1
lings5 = Lines5 + 1
Rows1 = Rows1 + 1
Rows2 = Rows2 + 1
Rows3 = Rows3 + 1
Rows4 = Rows4 + 1
Rows5 = Rows5 + 1
Rows6 = Rows6 + 1
Rows7 = Rows7 + 1
If xlSheet.Range(Lines1 & Rows1).vlaue = "●" And xlSheet.Range(Lines2 & Rows1).vlaue = "●" And xlSheet.Range(Lines3 & Rows1).vlaue = "●" And xlSheet.Range(Lines4 & Rows1).vlaue = "●" And xlSheet.Range(Lines5 & Rows1).vlaue = "●" Then
xlSheet.Cells(Lines1, Rows1).Interior.ColorIndex = 6
End If
Loop Until xlSheet.Range("A" & j + 1).Value = ""