1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| Sub JourNO()
Dim DateJNO As Variant
Dim JNO As Variant
JNO = 40
Range("B" & JNO).Select
' Boucle de recherche
Do While ActiveCell.Value <> Empty
DateJNO = Range("B" & JNO).Value
MsgBox (DateJNO)
' Recherche de la DateJNO dans les feuilles d'émargement
ActiveCell.Find(DateJNO, "B7", xlValue, xlWhole, xlByRows).Select
'!!!!!!!!!!!! le problème apparait ici!!!!!!!!!!!!!!!!!!il me met problème de variable!!!
' Hachurage des 4 cases (la première en léger les 3 suivante en gras)
With Selection.Interior
.Pattern = xlLightDown
.PatternThemeColor = xlThemeColorLight1
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 1).Select
With Selection.Interior
.Pattern = xlDown
.PatternThemeColor = xlThemeColorLight1
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 1).Select
With Selection.Interior
.Pattern = xlDown
.PatternThemeColor = xlThemeColorLight1
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(0, 1).Select
With Selection.Interior
.Pattern = xlDown
.PatternThemeColor = xlThemeColorLight1
.ColorIndex = xlAutomatic
End With
'Fin Hachurage
Selection.Resize(Selection.Rows.Count, Selection.Columns.Count -3).Select
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
End With
JNO = JNO + 1
Loop
End Sub |
Partager