Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionlOrgRow = MSGrid.Row lOrgCol = MSGrid.Col For lRow = MSGrid.FixedRows To MSGrid.Rows - 1 MSGrid.Row = lRow If MSGrid.TextMatrix(lRow, 9) = "payer" Or MSGrid.TextMatrix(lRow, 9) = "PAYER" Then lColor = vbGreen Else If MSGrid.TextMatrix(lRow, 9) = "impayer" Or MSGrid.TextMatrix(lRow, 9) = "IMPAYER" Then lColor = vbRed Else lColor = vbWhite End If End If For lCol = MSGrid.FixedCols To MSGrid.Cols - 1 MSGrid.Col = lCol MSGrid.CellBackColor = lColor Next lCol Next lRow
dim lrow as integer, lcol as integer
with MSGrid
for lrow = .fixedrows to .rows - 1
coul = vbwhite
select case ucase(.textmatrix(lrow, 9))
case "PAYER"
coul = vbgreen
case "IMPAYER"
coul = vbred
case else
coul = vbwhite
end select
for lcol = .fixedcols To .cols - 1
.col = lcol
.row = lrow
.cellBackcolor = coul
next
next
end with