Databases Reference
In-Depth Information
If RowPos > TRows Then Exit For
NoScans = NoScans + 1
RowPos = RowPos + 10
Next ii
For col = 1 To 12 Step 2
For row = 1 To 8 Step 2
For CellPos = 1 To UtilScans
'Rotate through Each Cell in Gage
defect = False 'Reset
For gage = 1 To 4
Debug.Print gage, Chr(ColOrigin + 64 + ColCoord(gage,
col + 1) - 2) & _
Trim(str((RowOrigin - 1 + RowCoord(gage, row) +
(CellPos - 1) * 10)))
If WithinSpec
(Workbooks(CalcBook).Worksheets("SGDefects").range(
Chr(ColOrigin + 64 + ColCoord
(gage, col + 1) - 2)
& Trim(str((RowOrigin - 1 + RowCoord
(gage, row) +
(CellPos - 1) * 10)))).Value) = False Then
defect = True
End If
Next gage
'If ANY Defects present in block of 4 - gage is bad
'Define Square Range
SQRange = Chr(ColOrigin + 64 + ColCoord(1, col + 1)
- 2) & _
Trim(str((RowOrigin - 1 + RowCoord(1, row) + (CellPos
- 1) * 10))) & ":" & _
Chr(ColOrigin + 64 + ColCoord(3, col + 1) - 1) & _
Trim(str((RowOrigin - 1 + RowCoord(3, row) + (CellPos
- 1) * 10)))
Debug.Print "SQRange: ", SQRange
If defect = True Then
Call ColorRangeBackground
(CalcBook, "SGDefects",
SQRange, 9)
Else
Call ColorRangeBackground
(CalcBook, "SGDefects",
SQRange, 35)
End If
Next CellPos
Next row
Next col
End Sub
Search WWH ::




Custom Search